Pizza Hut Pi Day Challenge: Index

I’m doing something that I should have done a long time ago: collecting a series of posts into one single post. The following links comprised my series on the 2016 Pizza Hut Pi Day Challenge.

Part 1: Statement of the problem.

Part 2: Using the divisibility rules for 1, 5, 9, 10 to reduce the number of possibilities from 3,628,800 to 40,320.

Part 3: Using the divisibility rule for 2 to reduce the number of possibilities to 576.

Part 4: Using the divisibility rule for 3 to reduce the number of possibilities to 192.

Part 5: Using the divisibility rule for 4 to reduce the number of possibilities to 96.

Part 6: Using the divisibility rule for 8 to reduce the number of possibilities to 24.

Part 7: Reusing the divisibility rule for 3 to reduce the number of possibilities to 10.

Part 8: Dividing by 7 to find the answer.

 

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.