I follow the blog “Math Jokes 4 Mathy Folks“. A recent post gave a game/riddle you can play with kids or even post a set of questions on some social media site and play with your friends. The post is “Can I Get Your Digits“.

So, here are the questions you can ask:

[Step-1] Pick a number with more than four digits (keep it secret).

[Step-2] Add the digits of the number together (keep it secret).

[Step-3] Subtract this sum from the original number (keep it secret).

[Step-4] From [Step-3] give me all the digits except for one of them (keep that digit secret).

[Step-5] I will ‘magically’ guess the missing (secret) digit!

The ‘magic-guess’ is: **Add up the digits given to you and then add what ever number it takes to get to the nearest multiple of nine and that number is the missing digit**.

So for example: the number 87694. When the digits are added you get 34. When you subtract 36 from 87694 you get 87660. Below is a table for each of the possible missing digits from number 87660.

Missing the ‘0’ … 8+7+6+6 = 27 (The missing digit is ZERO)

Missing the ‘6’ … 8+7+6+0 = 21 (The missing digit is SIX)

Missing the ‘7’ … 8+6+6+0 = 20 (The missing digit is SEVEN)

Missing the ‘8’ … 7+6+6+0 = 19 (The missing digit is EIGHT)

Now here is an explanation of why this always works.

The way numbers are represented is in what is called a ‘Place Value System’. In this system a number can be thought of as a sum of the digits of the number times a power of 10 (for a base 10 number). The power of 10 depends on the ‘Place’ of the digit. The ‘least-significant’ digit (the on on the right end of a number) can be thought of as that digit times . The next ‘Place’ is called the 10’s place and can be thought of as that digit times , with the next ‘Place’ being the 100’s place or the digit times and so forth.

So for example:

And this representation is equivalent to the following one when you replace the powers of 10 with the corresponding addition problem:

It is now clear how this ‘magic guess’ works. When you distribute each digit over the corresponding sum you get the following:

Regrouping you get the following very suggestive formula:

This is clearly the sum of the digits of the original number plus another number that is clearly a multiple of nine:

The main thing to realize here is that when you subtract from the original number you are left with a number that (whatever its actual digits are) is a multiple of nine.

Finally it is the case that any number that is a multiple of nine also has the property that the number resulting from summing its digits is also a multiple of nine. This final fact is what you use to find the missing digit. Leaving out a single digit will ‘disturb’ the sum so it is no longer a multiple of nine and you only need sum up what you are given and find that number that causes the sum to be a multiple of nine to deduce the missing digit.

**Notice**: When the dropped digit is either a ‘0’ or a ‘9’ your magic ‘guess’ should be: “You left out either a 9 or a 0.”

**Notice**: This explanation can be extended to an arbitrary number of digits and thus it would be a proof.

**Notice**: That a multiple of nine also has the properties that the sum of its digits is also a multiple of nine can be explained in exactly the same way as the explanation above goes. So assume some number is a multiple of nine:

Now write X as a sum of its digits with each one times its corresponding power of ten:

Notice that we can write each term of the sum as a digit of the the original number times the quantity where the symbol “” is 9 or 99 or 999 or 9999 and so forth.

This way of writing the number makes it clear what happens when each digit is distributed over the its corresponding sum and the the sum regrouped so that the sum of the digits of the original number are distinct from the rest of the number.

Now it is clear that each term of the rightmost sum can be factored by the number nine giving the formula below. The symbol “” is 1 or 11 or 111 or 1111 and so forth.

Recalling that the original number is a multiple of nine we get the following:

Finally subtracting the rightmost sum from both sides of the formula and factoring out the number nine we get the following which does show that the sum of the digits of the original number is a multiple of nine.