Tuesday, January 12, 2010

Number 9

In the past I have friends ask me why "mind reading" tricks work. A particular one led me to notice (and prove) that if you take any integer and subtract from it any anagram of it (subtracting the smaller number from the larger number) that the result is divisible by 9.

Now you prove it.

Labels:

4 Comments:

Blogger Neal said...

Any power of 10 is one more than a multiple of 9.
10^n = 9x + 1
Where x is some arbitrary integer
Any multiple (m) of a power of 10 is m more than a multiple of 9, Therefore a multiple of a power of 10 is only divisible by 9 if the multiple is divisible by 9.

So any number can be broken into multiples of powers of 10
ABCD = A * 103 + B * 102 + C * 10 + D

If we divide this number by 9 we will get
ABDC / 9 = (A * 10^3 + B * 10^2 + C * 10 + D) / 9
ABDC / 9 = (A * 10^3 / 9) + (B * 10^2 / 9) + (C * 10 / 9) + (D / 9)
And by the proof above this equation would be
ABCD / 9 = (A + B + C + D) / 9 + x / 9
Where x is some arbitrary integer divisible by 9
And we see that the remainder of any number divided by 9 is the sum of the digits.

Therefore, if we have any number (ABCD – BDCA) / 9 the remainder would be
(A + B + C + D) – (B + D + C + A) or zero.

Thus it would be divisible by 9

I hope this is not too confusing.

January 12, 2010 6:02 AM  
Blogger Chris said...

Hi Neal. The logic you used and the conclusion you made is correct. In my opinion, you've answered the challenge. Well done.

You have quite a few typos though: you have written ABDC instead of ABCD a couple of times, and have written e.g. 103 rather than 10^3.

I suspect that you aren't familiar with modulo/modular arithmetic. Modular arithmetic would enable you to write a cleaner answer.

Funnily enough, when I first solved the problem, I did it pretty much the same way as you did i.e. I noticed that 10^n = 9x + 1 and so A*10^n only left A as the remainder after dividing by 9. I would have used that a bit earlier than you did. But I wasn't publishing my result for general viewing, unlike you have, so I accept that you were trying to give a clearer argument than I was.

The particular trick that I was trying to understand went something like, think of a number, make an anagram of it, subtract the two numbers, give me all the non-zero numbers except one of them, then I'd tell you the number you held back. I think you'll be able to do that trick now.

Thanks for replying.

January 12, 2010 9:02 AM  
Blogger Neal said...

Yeah sorry about the typos. I guess I wrote my solution in too big of a hurry. I noticed some of them like 103 after I posted but I didn't see a way to edit the post.

I learned this trick several years ago on my high school math team: Any number is divisible by 9 if the sum of the digits is divisible by 9. (This also works with 3). I also learned the proof but I had forgotten most of it. It was interesting to extend it to include this problem.

I thought about using modulo but I hastily dismissed it thinking it would be more confusing. I guess I should have given it more thought.

It was a fun problem and thanks for the feedback.

January 13, 2010 6:09 AM  
Blogger Chris said...

Hi Neal. Thank you for your reply too.

January 15, 2010 4:27 AM  

Post a Comment

Links to this post:

Create a Link

<< Home