Math Explorer's Club
Tips for Mental Computations

Introduction
Lesson 1: Addition
Lesson 2: Subtraction
Lesson 3: Multiplication
Lesson 4: Division
Lesson 5: Calendar computations
Lesson 6: Guessing a number and other tricks

Guessing a number

Ask a person to think of an integer, say x. Here is a way we can recover x:
  1. Ask the person to triple it.
  2. The resul of step 1 is either even or odd:
    • If the resulting product is even, ask the person to divide it by 2.
    • If the resulting product is odd, ask the person to add 1 to it, and then divide by 2.
  3. Ask the person to triple the result of step 2.
  4. Then ask the person to divide the the result of step 3, ignoring the remainder.
  5. Suppose the final answer is y, and ask the person to tell you y. Then if the result of step 1 is even, x = 2y. Otherwise the result of step 1 is odd, and then x = 2y + 1

Let's put it to the test. I think of a number: 5.

  1. You ask me to triple it. I get 15, which is odd.
  2. You ask me to add 1, and then divide by to. I get 16/2 = 8.
  3. You ask me to triple the number again. I get 24
  4. Then you ask me to divide it by 9, ignoring the remainder. Since 24 = 2 × 9 + 6, I get 2.
  5. Then you tell me that the number I thought of is 2 × 2 + 1 = 5. You are right!

If you know a bit of algebra, you can show why the trick works. It is not hard at all! For instance, if the number selected was even, say x = 2a for some integer a. Then the result of the process describe is: (1) 6a, (2) 3a, (3) 9a, (4) a. So indeed x = 2a.

Activity: Guessing the number
  1. Find someone and practice this trick together.
  2. Make sure you understand why the trick works in the odd case.
  3. Can you think of some modifications of your own?
  4. Here is an interesting trick:
    1. Think of a number
    2. Double your number
    3. Add 4
    4. Divide by 2
    5. Subtract the original number
    No matter what your original number is, you get 2 at the end! Show that this is the case.
  5. Here is another nice trick:
    1. Pick a three digit number so that the digits are decreasing (such as 321)
    2. Subtract the reverse of the number you selected (the reverse of 321 is 123). You get a number x.
    3. Add the reverse of x to x.
    Your answer is 1089. Show that this is the case.

Constructing Magic Squares

Consider the table below
8
11 14
1
13
2
7
12
3
16
9
6
10
5
4
15

Call the table above A, and notice that each row, column and diagonal add up to 34, and each number appears exactly once. A table that satisfies this property is called a magic square. The sum of each row (or column, or diagonal) is called the magic constant of the magic square.

There is a nice way of constructing a magic square whith arbitrary magic constant c. This constant has to be bigger than 34, since we are not allowing repetition of numbers in the square and we have used the smaller numbers (from 1 to 16) to fill the square in the example above.

Suppose someone asks you to produce a magic square with magic constant c > 34. We can do that using the latin square above. Here is how:

  1. Take the difference c &minus 34 = d.
  2. Divide this number by 4 and record the quotient q and remainder r.
  3. For every square that does not have 13, 14, 16, 15 in the magic square A above add q. Otherwise add q + r.
  4. Once the process has been completed, we get a magic square with magic constant c.
As an example, take c = 55. Then:
  1. Take the difference 55 &minus 34 = 21.
  2. Divide this number by 4 and record the quotient q and remainder r. In our case, since 21 = 4 × 5 + 1, we have that q = 5 and r = 1.
  3. For every square that does not have 13, 14, 16, 15 in the magic square A above add q. Otherwise add q + r.
This yields
13
16 20
6
19
7
12
17
8
22
14
11
15
10
9
21
which is a magic square with the desired magic constant: 55.

There are a couple of observations that are relevant. First notice that not only the rows and columns add up to 55, but also the corners (13 + 6 + 21 + 15 =55), the 4 middle squares (7 + 12 + 14 + 22 = 55), the 4 squares formed by the 2 middle squares in the first and last row (16 + 20 + 10 + 9 = 55), and the 4 squares formed by the 2 middle squares in the first and last row (19 + 8 + 17 + 11 = 55). Also notice that A satisfies the same properties (the corners, 4 middle squares, 2 squares in the middle first and last row and column add up to the same).

In general, the method described above will create a magic square (with a given magic constant) that also satisfies the extra properties mentioned above. You can impress your friends by asking them to give you a magic constant, and you construct a very nice magic square. You may need to remember the original magic square A. But even if you use the square A, some of your friends may be surprised by this trick.

As for why the trick works, notice that the method adds 4 × q + r = c in each row, column, and the other 4 squares we mentioned.

Activity: Magic squares
  1. Construct a magic square with magic constant:35, 47, 78.
  2. What is so special about the squares containing 13, 14, 15, 16 in A? Can we modify the rules described so to use squares other than those containing 13, 14, 15, 16? What if we still want the corners, 4 middle squares, 2 squares in the middle first and last row and column add up to the same magic constant.
Cornell University, Department of Mathematics