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.

One thought on “Pizza Hut Pi Day Challenge (Part 2)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.