hey guys,
I was wondering how to prove this
Problem:
Let m be a positive integer and let n be an integer obtained from m by rearranging the digits of m in some way. (for example 381762 reaaranging 378126) prove m-n is divisble 9
thanks
Hello,
Well a simple way to do it is to remember that, S(.) being the sum of the digits of a number, $\displaystyle m\equiv S(m) \bmod 9$ (this can be easily proved with congruences, writing the number as powers of 10). And since $\displaystyle S(m)=S(n)$ (rearranging the digits won't change their sum !), then $\displaystyle m-n \equiv S(m)-S(n) \equiv 0 \bmod 9$
More generally, if the remainder of the sum of digits of a number, divided by 9, is n, then the remainder of the number, divided by 9, is also n. Since rearranging the digits in a number does not change the sum of digits, it also does not change the remainder when divided by n. Let A be the original number, and let n be its remainder when divided by 9: A= 9k+ n for some integer k. If B is any rearrangement of the digits of A, then B= 9j+ n for some integer j. A-B= (9k+ n)- (9j+ n)= 9(k- j).
You can prove that statement about the remainders by looking at the numbers expansion in powers of 10:
$\displaystyle A= a_0+ 10a_1+ 100a_2+ \cdot\cdot\cdot+ 10^ma_m$
$\displaystyle = a_0+ (9+ 1)a_1+ (99+ 1)a_2+ \cdot\cdot\cdot+ (9(1+ 10+\cdot\cdot\cdot+ 10^{m-1})a_m$
$\displaystyle = (a_0+ a_1+ a_2+ \cdot\cdot\cdot+ a_m)+ 9(a_1+ 11a_2+ \cdot\cdot\cdot (1+ 10^{k-1})a_m)$
Hm well, isn't that equivalent to what I wrote in #3 ? (I'm quite disturbed by your "more generally", not by the fact that you're giving another way to see through the answer)
The congruence gives the remainder, so...
And the OP seems to have understood the solution, given the private messages he's sent me...