Complicated algebra problem? A number subtracted by The same number but its digits scrambled is always a. Multiple of 9. Please give me a proof?

Can you please give me a proof and explain why this is always correct? Thanks

Hello, I have a question about math. You have a number (integer) and you subtract it by just moving any digits around, like 2139-1239 (1239 is just 2 and 1 switched) and the answer to that is always a multiple of 9. Like 234567891-123456789 is a mult of 9

1 Answer
Nov 21, 2017

See below.

Explanation:

Fixing ideas with a three digit integer decimal number

#n = a 10^2+b 10 + c#

Let #n_s = c 10^2+a 10+b# the scrambled number.

We have

#n-n_s = a 10^2+b 10 + c - c 10^2-a 10 - b = a(10^2-10)+b(10-1)-(10^2-1)c = 90 a+9 b-99 c = 9(10 a+b-11c)#

Note that after scrambling and adding, the digits #a,b,c# are multiplied by numbers of the form

#10^n-10^m# which always are divisible by #9#

NOTE:

#10^n - 10^m = 10^m(10^(n-m)-1)# and

#10^(n-m)-1 = (10-1)(1+10+cdots+10^(n-m-1))#