Games
Problems
Go Pro!

Dear Professor Puzzler,

Pick a three digit number. Reverse the digits. Subtract the smaller from the larger. Now add the digits of your result, and you get 18. Every time. How does this work?

Yvonne from Georgia

Hi Yvonne,

First of all, it doesn't work every time. Let's look at a counter-example first, and then we'll look at why it mostly works.

In order to make this not work, I picked a number in which the first and last digits were the same:

525. Reverse the digits and you get the same number. Subtract these and you get zero. Add the digits of zero, and you get...zero!

So, maybe you should rephrase your instructions to say that the digits have to be different, or that the first and last digits can't be the same.

Okay, so now let's look at the math behind what is happening.

Suppose the number I picked was abc, with representing the hundreds place, the tens place, and c the ones place.

Then the value of my number is 100a + 10b + c. And if I reverse the digits, the new number's value is 100c + 10b + a.

Now, we don't know which number is larger, so we'll assume the original number was bigger. If it was the other way around, we'd just have to reverse the sign of our result.

100a + 10b + c - (100c + 10b + a) =
100a + 10b + c - 100c - 10b - a =
99a - 99c =
99(a - c)

Isn't that interesting! Your result will always be a multiple of 99! Which means it's a multiple of 9 and a multiple of 11.

We have a divisibility rule for nine (you can find several divisibility rules here: Reference Unit on Divisibility Rules) which says that if a number is divisible by 9, its digits add to a multiple of 9. And 18 is certainly a multiple of 9!

From here, the easiest thing to do is to list out the multiples of 99 that are 3 digits or fewer, and you'll see that in each case, their digits add to either 0 or 18:

0 ⇒ 0
99 ⇒ 18
198 ⇒ 18
297 ⇒ 18
396 ⇒ 18
495 ⇒ 18
594 ⇒ 18
693 ⇒ 18
792 ⇒ 18
891 ⇒ 18
990 ⇒ 18

And there you have it! Except for the case of a repeated first and last digit, which gives you zero, every other possibility gives you 18!

Thanks for a fun question, Yvonne!

Professor Puzzler