Pizza Hut Pi Day Challenge (Part 8)

On March 14, 2016, Pizza Hut held a online math competition in honor of Pi Day, offering three questions posed by Princeton mathematician John H. Conway. As luck would have it, years ago, I had actually heard of the first question before from a colleague who had heard it from Conway himself:

I’m thinking of a ten-digit integer whose digits are all distinct. It happens that the number formed by the first n of them is divisible by n for each n from 1 to 10. What is my number?

I really like this problem because it’s looks really tough but only requires knowledge of elementary-school arithmetic. So far in this series, I described why the solution must be one of the following 10 numbers:

1 , 4 7 2 , 5 8 9 , 6 3 0,

7 , 4 1 2 , 5 8 9 , 6 3 0,

1 , 8 9 6 , 5 4 3 , 2 7 0,

9 , 8 1 6 , 5 4 3 , 2 7 0,

7 , 8 9 6 , 5 4 3 , 2 1 0,

9 , 8 7 6 , 5 4 3 , 2 1 0,

1 , 8 3 6 , 5 4 7 , 2 9 0,

3 , 8 1 6 , 5 4 7 , 2 9 0,

1 , 8 9 6 , 5 4 7 , 2 3 0,

9 , 8 1 6 , 5 4 7 , 2 3 0.

Up until now, I have used the divisibility rules to ensure that the property works for n = 1, 2, 3, 4, 5, 6, 8, 9, 10. But I haven’t used n = 7 yet.

Step 10. The number formed by the first seven digits must be a multiple of 7. There is a very complicated divisibility rule for checking to see if a number is a multiple of 7. However, at this point, it’s easiest to just divide by 7 and see what happens.

1 , 4 7 2 , 5 8 9 / 7 = 210,369.857\dots: not a multiple of 7.

7 , 4 1 2 , 5 8 9 / 7 = 1,058,941.285\dots: not a multiple of 7.

1 , 8 9 6 , 5 4 3 / 7 = 270,934.714\dots: not a multiple of 7.

9 , 8 1 6 , 5 4 3 / 7 = 1,402,363.285\dots: not a multiple of 7.

7 , 8 9 6 , 5 4 3 / 7 = 1,128,077.571\dots: not a multiple of 7.

9 , 8 7 6 , 5 4 3 / 7 = 1,410,934.714\dots: not a multiple of 7.

1 , 8 3 6 , 5 4 7 = 262,363.857\dots: not a multiple of 7.

3 , 8 1 6 , 5 4 7 / 7 = 545,221: a multiple of 7!!!

1 , 8 9 6 , 5 4 7 / 7 = 270,935.285\dots: not a multiple of 7.

9 , 8 1 6 , 5 4 7 / 7 = 1,402,363.857\dots: not a multiple of 7.

So, by inspection, only one of these works, yielding the answer to the puzzle:

3,816,547,290.

Pizza Hut Pi Day Challenge (Part 7)

On March 14, 2016, Pizza Hut held a online math competition in honor of Pi Day, offering three questions posed by Princeton mathematician John H. Conway. As luck would have it, years ago, I had actually heard of the first question before from a colleague who had heard it from Conway himself:

I’m thinking of a ten-digit integer whose digits are all distinct. It happens that the number formed by the first n of them is divisible by n for each n from 1 to 10. What is my number?

I really like this problem because it’s looks really tough but only requires knowledge of elementary-school arithmetic. So far in this series, I described why the solution must have one of the following four forms:

O , 4 O 2 , 5 8 1 , 6 O 0,

O , 4 O 2 , 5 8 9 , 6 O 0,

O , 8 O 6 , 5 4 3 , 2 O 0,

O , 8 O 6 , 5 4 7 , 2 O 0.

where O represents the remaining three odd digts. (The last digit is 0 and not an odd number.) There are 24 possible answers left.

Step 9. The number formed by the first three digits must be a multiple of 3. By the divisibility rules, this means that the sum of the first three digits must be a multiple of 3.

For the first form, that means that O + 4 + O must be a multiple of 3, where O is chosen from the remaining odd digits, which are 3, 7, and 9. We can directly test this to see that it’s impossible:

3 + 4 + 7 = 14, not a multiple of 3.

3 + 4 + 9 = 16, not a multiple of 3.

7 + 4 + 9 = 20, not a multiple of 3.

For the second form, that means that O + 4 + O must be a multiple of 3, where O is chosen from the remaining odd digits, which are 1, 3, and 7. We can directly test this:

1 + 4 + 3 = 8, not a multiple of 3.

1 + 4 + 7 = 12, a multiple of 3.

3 + 4 + 7 = 14, not a multiple of 3.

Therefore, for the second form, the first three digits could be either 147 or 714.

For the third form, that means that O + 8 + O must be a multiple of 3, where O is chosen from the remaining odd digits, which are 1, 7, and 9. We can directly test this to see that it’s impossible:

1 + 8 + 7 = 16, not a multiple of 3.

1 + 8 + 9 = 18, a multiple of 3.

7 + 8 + 9 = 24, a multiple of 3.

Therefore, for the third form, the first three digits could be either 189, 981, 789, or 987.

For the fourth form, that means that O + 8 + O must be a multiple of 3, where O is chosen from the remaining odd digits, which are 1, 3, and 9. We can directly test this to see that it’s impossible:

1 + 8 + 3 = 12, a multiple of 3.

1 + 8 + 9 = 18, a multiple of 3.

3 + 8 + 9 = 20, not a multiple of 3.

Therefore, for the fourth form, the first three digits could be 183, 381, 189, or 981.

1 , 4 7 2 , 5 8 9 , 6 O 0,

7 , 4 1 2 , 5 8 9 , 6 O 0,

1 , 8 9 6 , 5 4 3 , 2 O 0,

9 , 8 1 6 , 5 4 3 , 2 O 0,

7 , 8 9 6 , 5 4 3 , 2 O 0,

9 , 8 7 6 , 5 4 3 , 2 O 0,

1 , 8 3 6 , 5 4 7 , 2 O 0,

3 , 8 1 6 , 5 4 7 , 2 O 0,

1 , 8 9 6 , 5 4 7 , 2 O 0,

9 , 8 1 6 , 5 4 7 , 2 O 0.

Indeed, for each of these, there is only one odd digit left, which means we automatically know what it has to be for each of these 10 answers by process of elimination:

1 , 4 7 2 , 5 8 9 , 6 3 0,

7 , 4 1 2 , 5 8 9 , 6 3 0,

1 , 8 9 6 , 5 4 3 , 2 7 0,

9 , 8 1 6 , 5 4 3 , 2 7 0,

7 , 8 9 6 , 5 4 3 , 2 1 0,

9 , 8 7 6 , 5 4 3 , 2 1 0,

1 , 8 3 6 , 5 4 7 , 2 9 0,

3 , 8 1 6 , 5 4 7 , 2 9 0,

1 , 8 9 6 , 5 4 7 , 2 3 0,

9 , 8 1 6 , 5 4 7 , 2 3 0.

So we’re down to 10 possible answers left.

In tomorrow’s post, I’ll finally find the answer.

Pizza Hut Pi Day Challenge (Part 6)

On March 14, 2016, Pizza Hut held a online math competition in honor of Pi Day, offering three questions posed by Princeton mathematician John H. Conway. As luck would have it, years ago, I had actually heard of the first question before from a colleague who had heard it from Conway himself:

I’m thinking of a ten-digit integer whose digits are all distinct. It happens that the number formed by the first n of them is divisible by n for each n from 1 to 10. What is my number?

I really like this problem because it’s looks really tough but only requires knowledge of elementary-school arithmetic. So far in this series, I described why the solution must have one of the following four forms:

O , 4 O 2 , 5 8 O , 6 O 0,

O , 6 O 2 , 5 8 O , 4 O 0,

O , 2 O 6 , 5 4 O , 8 O 0.

O , 8 O 6 , 5 4 O , 2 O 0.

where O is one of 1, 3, 7, and 9. (The last digit is 0 and not an odd number.) There are 96 possible answers left.

Step 8. The number formed by the first eight digits must be a multiple of 8. By the divisibility rules, this means that the number formed by the sixth, seventh, and eighth digits must be a multiple of 8.

For the first form, that means that 8O6 must be a multiple of 8. We can directly test this:

816/8 = 102: a multiple of 8.

836/8 = 104.5: not a multiple of 8.

876/8 = 109.5: not a multiple of 8.

896/8 = 112: a multiple of 8.

For the second form, that means that 8O4 must be a multiple of 8. This is impossible. Let O = 2n+1. Then

8O4 = 800 + 10 \times O + 4

= 800 + 10(2n+1) + 4

= 800 + 20n + 14

= 2(400 + 10n + 7).

We see that 7 is odd, and therefore 400 + 10n + 7 is not a multiple of 2. Therefore, 2(400 + 10n + 7) is not a multiple of 4 (let alone 8).

For the third form, that means that 4O8 must be a multiple of 8. This is also impossible. Let O = 2n+1. Then

4O8 = 400 + 10 \times O + 8

= 400 + 10(2n+1) + 8

= 400 + 20n + 18

= 2(200 + 10n + 9).

We see that 9 is odd, and therefore 200 + 10n + 9 is not a multiple of 2. Therefore, 2(200 + 10n + 9) is not a multiple of 4 (let alone 8).

For the fourth form, that means that 4O2 must be a multiple of 8. We can directly test this:

412/8 = 51.5: not a multiple of 8.

432/8 = 54: a multiple of 8.

472/8 = 59: a multiple of 8.

492/8 = 61.5: not a multiple of 8.

In other words, we’re down to

O , 4 O 2 , 5 8 1 , 6 O 0,

O , 4 O 2 , 5 8 9 , 6 O 0,

O , 8 O 6 , 5 4 3 , 2 O 0,

O , 8 O 6 , 5 4 7 , 2 O 0.

For each of these, there are 3! = 6 ways of choosing the remaining odd digits. Since there are four forms, there are 4 x 6= 24 possible answers left.

In tomorrow’s post, I’ll cut this number down to 10.

Pizza Hut Pi Day Challenge (Part 5)

On March 14, 2016, Pizza Hut held a online math competition in honor of Pi Day, offering three questions posed by Princeton mathematician John H. Conway. As luck would have it, years ago, I had actually heard of the first question before from a colleague who had heard it from Conway himself:

I’m thinking of a ten-digit integer whose digits are all distinct. It happens that the number formed by the first n of them is divisible by n for each n from 1 to 10. What is my number?

I really like this problem because it’s looks really tough but only requires knowledge of elementary-school arithmetic. So far in this series, I described why the solution must have one of the following four forms:

O , E O 2 , 5 8 O , E O 0,

O , E O 8 , 5 2 O , E O 0,

O , E O 4, 5 6 O , E O 0,

O , E O 6 , 5 4 O , E O 0.

where E is one of 2, 4, 6, and 8 (not already included) and O is one of 1, 3, 7, and 9. (The last digit is 0 and not an odd number.) There are 192 possible answers left.

Step 7. The number formed by the first four digits must be a multiple of 4. By the divisibility rules, this means that the number formed by the third and fourth digits must be a multiple of 4.

In other words, the two digit number OE has to be a multiple of 4, where O is odd and E is even. Let O = 2n+1 and E = 2k. Then

OE = 10 \times O + E

= 10(2n+1) + 2k

= 20n+2k+10

= 2(10n+k+5)

also has to be a multiple of 4, which means that 10n+k+5 has to be a multiple of 2. Since 10n is already of a multiple of 2, that means that k + 5 must be a multiple of 2, or that k must be odd.

In other words, E = 2k, where k is an odd number. Therefore, the fourth digit must be either 2 or 6. This eliminates two of the above forms, so we’re down to

O , E O 2 , 5 8 O , E O 0,

O , E O 6 , 5 4 O , E O 0.

At this point, I can include the remaining ways of choosing the even digits:

O , 4 O 2 , 5 8 O , 6 O 0,

O , 6 O 2 , 5 8 O , 4 O 0,

O , 2 O 6 , 5 4 O , 8 O 0.

O , 8 O 6 , 5 4 O , 2 O 0.

For each of these, there are 4! = 24 ways of choosing the remaining odd digits. Since there are four forms, there are 4 x x 24 = 96 possible answers left.

In tomorrow’s post, I’ll cut this number down to 24.

Pizza Hut Pi Day Challenge (Part 4)

On March 14, 2016, Pizza Hut held a online math competition in honor of Pi Day, offering three questions posed by Princeton mathematician John H. Conway. As luck would have it, years ago, I had actually heard of the first question before from a colleague who had heard it from Conway himself:

I’m thinking of a ten-digit integer whose digits are all distinct. It happens that the number formed by the first n of them is divisible by n for each n from 1 to 10. What is my number?

I really like this problem because it’s looks really tough but only requires knowledge of elementary-school arithmetic. So far in this series, I described why the solution must have the form

O , E O E , 5 E O , E O 0,

where E is one of 2, 4, 6, and 8 and O is one of 1, 3, 7, and 9. (The last digit is 0 and not an odd number.) There are 576 possible answers left.

Step 6. The number formed by the first three digits must be a multiple of 3. Also, the number formed by the first six digits must be a multiple of 6, which means it’s also a multiple of 3. By the divisibility rules, the sum of the first three digits must be a multiple of 3, and the sum of the first six digits must be a multiple of 3. Therefore, the sum of the fourth, fifth, and sixth digits must be 3.

Stated another way, the fourth and sixth digits have to be different even numbers so that 5 plus the sum of these two even numbers is a multiple of 3. Some quick testing reveals that these two even numbers have to be either 4 and 6 or else 2 and 8 in some order:

5 + 2 + 4 = 11, not a multiple of 3.

5 + 2 + 6 = 13, not a multiple of 3.

5 + 2 + 8 = 15, a multiple of 3.

5 + 4 + 6 = 15, a multiple of 3.

5 + 4 + 8 = 17, a multiple of 3.

5 + 6 + 8 = 19, not a multiple of 3.

Therefore, the solution must have one of the following forms:

O , E O 2 , 5 8 O , E O 0,

O , E O 8 , 5 2 O , E O 0,

O , E O 4, 5 6 O , E O 0,

O , E O 6 , 5 4 O , E O 0.

For each of these there are 2! = 2 ways of choosing the remaining even digits and 4! = 24 ways of choosing the remaining odd digits. Since there are four forms, there are 4 x 2 x 24 = 192 possible answers left.

In tomorrow’s post, I’ll cut this number in half.

Pizza Hut Pi Day Challenge (Part 3)

On March 14, 2016, Pizza Hut held a online math competition in honor of Pi Day, offering three questions posed by Princeton mathematician John H. Conway. As luck would have it, years ago, I had actually heard of the first question before from a colleague who had heard it from Conway himself:

I’m thinking of a ten-digit integer whose digits are all distinct. It happens that the number formed by the first n of them is divisible by n for each n from 1 to 10. What is my number?

I really like this problem because it’s looks really tough but only requires knowledge of elementary-school arithmetic. In yesterday’s post, I described why the solution must have the form

 

___ , ___ ___ ___ , 5 ___ ___ , ___ ___ 0,

where the blanks have to filled by using the numbers 1, 2, 3, 4, 6, 7, 8, and 9. There are 8 remaining digits, and so there are 8! = 40,320 possible answers left.

Step 5. The number formed by the first two digits has to be a multiple of 2. The number formed by the first four digits has to be a multiple of 4, which means it’s also a multiple of 2. The number formed by the first six digits has to be a multiple of 6, which means it’s also a multiple of 2. The number formed by the first eight digits has to be a multiple of 8, which means it’s also a multiple of 2. By the divisibility rules, that means that the second, fourth, sixth, and eighth digits are even numbers. So the ten-digit number must have the form

___ , E ___ E , 5 E ___ , E ___ 0,

where E is one of 2, 4, 6, and 8. Therefore, the remaining dashes must be odd numbers:

    O , E O E , 5 E O , E O 0,

where O is one of 1, 3, 7, and 9. There are 4! = 24 ways of arranging the four remaining even digits and also 4! = 24 ways of arranging the remaining odd digits. Therefore, there are 24 x 24 = 576 possible answers left.

While it’s now tractable to find this number by brute force by listing and testing the 576 possible numbers, we can use the divisibility rules to reduce the list to only 192. I’ll continue this in tomorrow’s post.

 

Pizza Hut Pi Day Challenge (Part 2)

On March 14, 2016, Pizza Hut held a online math competition in honor of Pi Day, offering three questions posed by Princeton mathematician John H. Conway. As luck would have it, years ago, I had actually heard of the first question before from a colleague who had heard it from Conway himself:

I’m thinking of a ten-digit integer whose digits are all distinct. It happens that the number formed by the first n of them is divisible by n for each n from 1 to 10. What is my number?

I really like this problem because it’s looks really tough but only requires knowledge of elementary-school arithmetic. To illustrate this idea, let me give an example that almost works: 9,632,581,470, a ten-digit number that uses each digit exactly once.

  1. The first digit is 9, which is clearly a multiple of 1.
  2. The first two digits form the number 96, which is clearly a multiple of 2: 96 = 2 \times 48.
  3. The first three digits form the number 963, which is a multiple of 3: 963 = 3 \times 321.
  4. The first four digits form the number 9632, which is a multiple of 4: 9632 = 4 \times 2408.
  5. The first five digits form the number 96,325, which is a multiple of 5: 96,325 = 5 \times 19,265.
  6. The first six digits form the number 963,258, which is a multiple of 6: 963,258 = 6 \times 160,523.
  7. The first seven digits form the number 9,632,581, which is a multiple of 7: 9,632,581 = 7 \times 1,376,083.
  8. Doesn’t work: 96,325,814 = 8 \times 12,040,726 + 6.
  9. The first nine digits for the number 963,258,147, which is a multiple of 9: 963,258,147 = 9 \times 107,028,683
  10. The ten-digit number is a multiple of 10: 9,632,581,470 = 10 \times 963,258,147.

So, this number works for 9 of the 10 cases… but we need the number that works for all 10 cases.

green lineHere’s the ten-digit number, where the blanks have to be filled in:

___ , ___ ___ ___ , ___ ___ ___ , ___ ___ ___.

Each of the blanks has to be a digit from 0 through 9, and each can only be used once. Therefore, there are 10! = 3,628,800 possible answers, but we’d like to whittle this down to a more tractable number.

Step 1. This ten-digit number has to be a multiple of 10. By the divisibility rules, that means that the last digit has to be 0. So the ten-digit number must have the form

___ , ___ ___ ___ , ___ ___ ___ , ___ ___ 0.

Each of the blanks has to be a digit from 1 through 9, and each can only be used once. Therefore, at this stage, there are 9! = 362,880 possible answers.

Step 2. The number formed by the first five digits has to be a multiple of 5. By the divisibility rules, that means that the fifth digit has to be either 5 or 0. However, the 0 has already been used, so the fifth digit must be 5. So the ten-digit number must have the form

___ , ___ ___ ___ , 5 ___ ___ , ___ ___ 0.

Each of the blanks has to be one of the 8 remaining digits, and each can only be used once. Therefore, at this stage, there are 8! = 40,320 possible answers.

Step 3. The number formed by the first nine digits has to be a multiple of 9. By the divisibility rules, that means that the sum of the first nine digits has to be a multiple of 9. However, this isn’t helpful: we know that the first nine digits are going to be 1 through 9 in some order, and we already know that

1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 = 45

is a multiple of 9. So considering the first nine digits gives us no new information.

Step 4. The first digit has to be a multiple of 1. However, this isn’t helpful since every digit is a multiple of 1. So considering only the first digit gives us no new information.

I’ll continue this discussion with tomorrow’s post, where I’ll reduce the number of possible answers from 40,320 to only 576.

Pizza Hut Pi Day Challenge (Part 1)

On March 14, 2016, Pizza Hut held a online math competition in honor of Pi Day, offering three questions posed by Princeton mathematician John H. Conway. As luck would have it, years ago, I had actually heard of the first question before from a colleague who had heard it from Conway himself:

I’m thinking of a ten-digit integer whose digits are all distinct. It happens that the number formed by the first n of them is divisible by n for each n from 1 to 10. What is my number?

To illustrate this idea, let me give an example that almost works: 9,632,581,470, a ten-digit number that uses each digit exactly once.

  1. The first digit is 9, which is clearly a multiple of 1.
  2. The first two digits form the number 96, which is clearly a multiple of 2: 96 = 2 \times 48.
  3. The first three digits form the number 963, which is a multiple of 3: 963 = 3 \times 321.
  4. The first four digits form the number 9632, which is a multiple of 4: 9632 = 4 \times 2408.
  5. The first five digits form the number 96,325, which is a multiple of 5: 96,325 = 5 \times 19,265.
  6. The first six digits form the number 963,258, which is a multiple of 6: 963,258 = 6 \times 160,523.
  7. The first seven digits form the number 9,632,581, which is a multiple of 7: 9,632,581 = 7 \times 1,376,083.
  8. Doesn’t work: 96,325,814 = 8 \times 12,040,726 + 6.
  9. The first nine digits for the number 963,258,147, which is a multiple of 9: 963,258,147 = 9 \times 107,028,683
  10. The ten-digit number is a multiple of 10: 9,632,581,470 = 10 \times 963,258,147.

So, this number works for 9 of the 10 cases… but we need the number that works for all 10 cases.

In this series, I plan to discuss my solution of this problem using the rules of divisibility. I’ll start my solution with tomorrow’s post.

In the meantime, if you’d like to think about the solution on your own, I offer this green thought bubble to give you some time to think about it on your own.

green_speech_bubble

 

My Mathematical Magic Show: Index

I’m doing something that I should have done a long time ago: collecting a series of posts into one single post. Here’s my series on the mathematical magic show that I’ll perform from time to time.

Part 1: Introduction.

Part 2a, 2b, and 2c: The 1089 trick.

Part 3a, 3b, and 3c: A geometric magic trick (see also here).

Part 4a, 4b, 4c, and 4d: A trick using binary numbers.

Part 5a, 5b, 5c, 5d: Predicting a digit that’s been erased from a number.

Part 6: Finale.

Part 7: The Fitch-Cheney 5-card trick.

Part 8a, 8b, 8c: A trick using Pascal’s triangle.

 

My Mathematical Magic Show: Part 5b

Last March, on Pi Day (March 14, 2015), I put together a mathematical magic show for the Pi Day festivities at our local library, compiling various tricks that I teach to our future secondary teachers. I was expecting an audience of junior-high and high school students but ended up with an audience of elementary school students (and their parents). Still, I thought that this might be of general interest, and so I’ll present these tricks as well as the explanations for these tricks in this series. From start to finish, this mathematical magic show took me about 50-55 minutes to complete. None of the tricks in this routine are original to me; I learned each of these tricks from somebody else.

green line

Here’s the patter for my fourth and most impressive trick. As before, my audience has a sheet of paper and a pen or pencil; quite a few of them have calculators.

Write down any five-digit number you want. Just make sure that the same digit repeated (not something like 88,888).

(pause)

Now scramble the digits of your number, and write down the new number. Just be sure that any repeated digits appear the same number of times. (For example, if your first number was 14,232, your second number could be 24,231 or 13,422.)

(pause)

Is everyone done? Now subtract the smaller of the two numbers from the bigger, and write down the difference. Use a calculator if you wish.

(pause)

Has everyone written down the difference. Good. Now, pick any nonzero digit in the difference, and scratch it out.

(pause)

(I point to someone.) Which numbers did you not scratch out?

The audience member will say something like, “8, 2, 9, and 6.” To which I’ll reply in three seconds or less, “The number you scratched out was a 2.”

Then I’ll turn to someone else and ask which numbers were not scratched out. She’ll say something like, “3, 2, 0, and 7.” I’ll answer, “You scratched out a 6.”

green lineAfter performing this trick, I’ll explain how it works. I gave a very mathematical explanation in a previous post for why this trick works, but the following explanation seems to go over well with even elementary-school students. I’ll ask an audience member for the two five-digit numbers that they subtracted. Suppose that she tells me that hers were

43,125-24,513

I’ll now tell the audience that, ordinarily, we would plug this into a calculator or else start by subtracting the ones digits. However, I tell the audience, I’m now going to write this in a very unusual way:

(40,000 + 3,000 + 100 + 20 + 5) - (20,000 + 4,000 + 500 + 10 + 3)

I tell the audience, “For now, I’m not saying why I did this. But does everyone agree that I can do this?” Once I get agreement, then I proceed to the next step by grouping like digits together:

(40,000 - 4,000) + (3,000 - 3) + (100 - 10) + (20 - 20,000) + (5 - 500)

Again, I tell the audience, “For now, I’m not saying why I did this. But does everyone agree that I can do this?” Once I get agreement, then I proceed to the next step by reversing the signs of any negative differences:

(40,000 - 4,000) + (3,000 - 3) + (100 - 10) - (20,000 - 20) - (500 - 5)

Next, I factor each common difference. Notice that in each parenthesis, the second number is a factor of the first number:

4,000(10-1) + 3(1,000 - 1) + 10(10 - 1) - 20(1,000 - 1) - 5(100 - 1),

or

4,000(9) + 3(999) + 10(9) - 20(999) - 5(99).

Notice that the number in each pair of parentheses is a multiple of 9. Therefore, no matter what, the difference must be a multiple of 9.

This is the key observation that makes the trick work. Now, I go back to my audience member and ask what the difference actually was:

43,125-24,513 = 18,612

This difference must be a multiple of 9. Therefore, by one of the standard divisibility tricks, the digits of this number must add to a multiple of 9:

1 + 8 + 6 + 1 + 2 = 18.

Then I’ll ask the audience member, “Which number did you scratch out?” Suppose she answers 6. Then I’ll add up the remaining numbers:

1 + 8 + 1 + 2 = 12.

So I ask the audience, “So these four numbers add up to 12, but I know that all five numbers have to add up to a multiple of 9. What’s the next multiple of 9 after 12?” They’ll answer, “18”. I ask, “So what does the missing number have to be?” They’ll answer “18-12, or 6.”

Then I’ll repeat with someone else. If an audience member answers “8, 2, 9, and 6,” I’ll ask the audience for the sum of these four numbers. (It’s 25.) So they can figure out that the scratched-out number was 2, since 25+2 = 27 is the next multiple of 9 after 25.

green lineI’m often asked why I made people choose a five-digit number at the start of the routine. The answer is, I could have chosen any size number I wanted as long as I’m comfortable with quickly adding the digits at the end of the magic trick. In other words, if I had permitted nine-digit numbers, I might need to add 8 numbers at the end of the routine to get the missing number. I could do it, but I wouldn’t get the answer as quickly as the five-digit numbers.

Also, I’m often asked why it was important that I told the audience to scratch out a nonzero number. Well, suppose that I came to end of the routine and the audience member told me her remaining digits were 4, 3, and 2. These numbers have a sum of 9, and so the missing number hypothetically could be 0 or 9. So by instructing the audience to not scratch out a 0, that eliminates the ambiguity from this special case.

After showing the audience how the trick works, I’ll then ask an audience member to come forward and repeat the trick that I just performed. Then I’ll move on to the final act of my routine, which I’ll present in tomorrow’s post.