Thursday, June 16, 2011

The magic with any three-digit number


My daughter's school teacher is showing kids some number mysticism.
She told them to take any 3 digit number, e.g.793.
Scramble its digits, e.g. 397.
Subtract from the larger of these two numbers the smaller one: 793-397=396.
Add the digits of the remaining number, e.g. for a number 396 a sum of digits will be 3+9+6=18.
Then, continue adding digits of the last number you got till the sum is just one digit: 1+8=9.
Surprisingly, no matter what number you start from and how you scramble it, the result is always 9!

The puzzle is why is this happening. And the extra credit question is how to explain this to a 8 year old.

Top image by Hryck, distributed under CCL.

Answers accepted all day long on Friday June 17th and Saturday June 18th, on our Family Puzzle Marathon. They will be hidden until Sunday morning (EST) and everyone who solved it will get a puzzle point.

9 comments:

SteveGoodman18 said...

The original number with digits abc, has a value of 100a + 10b + c. When you scramble the digits, the new number could have different coefficients for a, b, and c, but they are still 100, 10, and 1, just in a different order.

When you subtract the two numbers, combining like terms of their values leaves the digits a, b, and c, with coefficients that are either 99, 90, 9, 0, -9, -90, or -99.

(For example 793 = 100(7) + 10(9) +1(3) and 397 = 100(3) + 10(9) + 1(7). Their difference is now 99(7) + 0(9) + -99(3).)

In the difference, since all of the coefficients are multiples of 9, then their sum (that is, the value you got when you subtracted your two numbers) is divisible by 9. When a number is divisible by 9, as this difference always will be, then the sum of its digits will be divisible by 9.

In fact, any 3-digit number divisible by 9 will either have a digit sum of 9, 18, or 27. It's easy to show that in each of these cases the next iteration of summing the digits will yield 9.

A few 8-year-olds can handle this algebraic argument. As for the rest? Hmmm......

Tom said...

Remarkable. Seems to hold true even when the result of the subtraction goes negative. May also work with 4-digit numbers? (Haven't tried many of those YET.) Ooh, and 2-digit numbers also?

The only exception appears to be with a number like 555 or 444, 3 of the same integer, when the result of subtraction is zero (which, I guess, is also a whole-number and a multiple of 9).

Now wondering what happens in base-7 systems or something non-decimal.

Haven't got to WHY yet, tho.

Ilya said...

Let's say the number is XYZ. The difference of the original and some permutation can be expressed as:
100*X + 10*Y + Z - 100*Z - 10*X - Y, which is
90*X + 9*Y - 99*Z. Other permutations will yield something very similar. These expressions are divisible by 9 because all the coefficients are divisible by 9, which means that the sum of its digits is divisible by 9 (the latter is a well-known fact, I hope I don't need to prove that here :-). That sum, given that we are dealing with at most a three-digit number, can be either 27, 18 or 9. If 9, then we've arrived. If 27, then 2+7=9; if 18, then 1+8=9.

If I can think of how to explain to an 8-year-old, will post separately.

Bean said...

The algebra way: the original number is 100a+10b+c. Scrambled combinations would be 100b+10c+a, 100c+10a+b, 100b+10a+c, 100c+10b+a, 100a+10c+b. Whichever combination you choose, the math for each variable will always be 100-10, or 100-1, or 10-1, or vice versa...always a multiple of 9. So your result is always a variation on 9(100a+10b+c) (variables in different orders, negatives in any position), so always divisible by 9.

If a number is divisible by 9, it's digits will always add up to a multiple of 9. Reapply this principle enough times, and you get 9 for your final answer.

Lynnet said...

I did it using algebra: abc=100a+10b+c. One way to scramble this would be: bca=100b+10c+a. To subtract these you have to line them up by name (variable name, a, b, and c) so it becomes:
100a+10b+c
- (a+100b+10c)
--------------
99a-90b-9c
Because a, b, and c are integers, 99a, 90b, and 9c are integer multiples of 9, so their sum must be a multiple of 9. The fact that they might be negative numbers doesn't matter because negative numbers are still multiples of 9. No matter how the digits move, you will either get a 0, a 9, a string of 9's, or a string of 9's and 0's. All of those possibilities are multiples of 9.

I also noticed that this will work with any number of digits, not just with 3-digit numbers. The difference will always be a multiple of 9 (90, 99, 990, etc), or if the digit lines up, it will be a zero.

My mom reminded me of the technique of giving each digit a variable like we did in the reversed-age puzzle a few weeks ago. She also came up with an explanation for an 8-year-old, but I can't explain it so she said she would post it.

Lynnet's Mom said...

(Lynnet is having trouble explaining the 8yo-friendly explanation we came up with, so I said I'd help. (I'm kind of a ringer, being an educational therapist and a former classroom math teacher, so I don't usually post puzzle solutions.))

Okay, so let's pull out the base 10 blocks. Those should be familiar to any 8yo these days. To help us see what's going on, we're going to build a number with three different digits, let's say 832. That will be 8 flats (100s), 3 rods (10s), and 2 units (1s).

Now, we can rearrange the digits, let's say 283. That will be 2 flats, 8 rods, and 3 units. Build that separately. My base-10 set is molded / colored such that I can flip them upside down for negative numbers or just to keep them separate -- that makes it a little bit easier to see what's going on.

Now, to do the subtraction, instead of keeping the flats with the flats and the rods with the rods and such, we're going to put the blocks with the same value for the digit together (that's the same as combining like terms when we did it with variables representing the digits). That is, we're going to put the 8 flats with the 8 rods, the 3 rods with the 3 units, and the 2 units with the 2 flats.

Now, watch me match them up -- when we look at the difference between the 8 flats and the 8 rods, we can put one rod on each flat, covering up 10 and leaving 90 exposed, so now we see that we have 8*100 - 8*10 = 8*90. When we look at the difference between the 3 rods and the 3 units, we can put one unit on each rod, covering up 1 and leaving 9 exposed => 3*10 - 3*1 = 3*9. Same with the 2 units and the 2 flats -- we can put one unit on each flat, covering up 1 and leaving 99 exposed => 2*100 - 2*1 = 2*99.

That makes it much more visually obvious that however we shuffle the digits, the difference is always going to be a sum of integers that are multiples of 9, and therefore will itself be a multiple of 9 (note that we don't actually care which chunks end up as negative numbers, because that doesn't affect divisibility by 9).

Note that if a digit ends up in the same place it was before, the difference will be zero, which doesn't affect whether the sum will be a multiple of 9.

(The add-the-digits trick for checking for divisibility by 9 is a tool I happened to already have in my toolbox and which Lynnet learned in school a few years ago, so I'm not going to prove it here.)

I wanted to also comment that this trick will work for *any* number of digits, not just three. Lynnet did it with four digits and the base-10 blocks (I had just barely enough thousand-cubes to make this interesting - any classroom would have those.) The differences between powers of 10 are always going to be multiples of 9. (cube - flat = 900, cube - rod = 990, cube - unit = 999, flat - rod = 90, flat - unit = 99, rod - unit = 9, and this should be intuitively obvious (grin) that it will apply generally.

Tom said...

Tom early Sunday morning:

The numerology surrounding the number nine is wonderful fun. If we look at some basic axioms and corollaries (observations) about 9, then this puzzle is less puzzling. This “magic of 3-digit numbers” is a compilation of several smaller puzzles, and it appears to be true of large numbers also.

Let’s look at several, and here we are only going to deal with whole integers.

Any small multiple of 9, contains digits that will add up to 9: 18, 27, 36, 45 etc.

Any large multiple of 9 also contains digits that will add up to 9 or a multiple of 9: 99, 108, 117, 126, 135 etc., and even 999, 1008, 1017, 1026 etc. and 18135, 18144, 18153

If the digits of any number add up to a sum of 9, or add up to a multiple of 9, then that number IS a multiple of 9. (1111101111000, for instance.)

The difference between any number containing two digits or more, and its “reverse” will result in a multiple of 9 (or perhaps zero, which is also a multiple of 9):
32-23=9
23-32= -9

67-76= -9

543 -345= 198
455 – 554 = -99

54321-12345 = 41976 (yes, a multiple of 9)

Now this “scrambling” also seems to result in multiples of 9 (and therefore, the digits sum to 9 or a multiple). I don’t see the logic to it yet, but I have become convinced.

356 – 563 = -207
357 – 735 = -378
734 – 473 = 261
638721 – 318627 = 320094 (yes)

Delightful stuff. I don’t think I could or would explain WHY to an 8-year-old, about perhaps anything! So I won’t get credit for a “solution” nor the extra credit unless Maria is generous.

Anonymous said...

Amazing explanations!
One magical math trick that everyone used was to replace the digits with variables: ABC, and when counting the value of the number use 100xA + 10xB + 1xC.
Another one was to remember the real magic property of number 9: any number with sum of its digits divisible by 9 is divisible by 9.

Lynnet's mom - thank you so much for the proposed explanation for a 8-year old. It is ingenious! I will try it on my daughter later today. What you are doing with your daughter is fantastic. Lynnet knows math, loves it and enjoys it. I think you deserve 3 extra puzzle points.

One puzzle point for the rest: SteveGoodman18, Ilya, Bean, Lynnet. Tom - I really value your time, persistence and literature survey. We probably should not give you a point today to be fair.

Happy Fathers day, everyone!

Maria

kanhaiya sharma said...

Nice post. Parents are parents, not Gods. Of course they cannot have all the answers. The way you explain things to your kids should do all the work…it all comes under parenthood and your people skills.
Aptitude test

Post a Comment

Note: Only a member of this blog may post a comment.