# Prove that (integer)-(the sum of it's digits) can be divided by 9 [duplicate]

How to prove this:

1. Choose whichever integer you like
2. Subtract from it the sum of it's digits
3. The result can always be divided by 9

For example:

1. I choose 123.
2. The sum of it's digits is 1+2+3=6.
3. 123-6 = 117. And 117/9 = 13.

## migrated from mathematica.stackexchange.comFeb 7 '15 at 14:58

This question came from our site for users of Wolfram Mathematica.

• Try ls = {a, b, c, d, e, f} and FromDigits[ls] - Total[ls] // Expand and see if you can generalize. – b.gatessucks Feb 7 '15 at 13:35
• Without Mathematica this is also easy write the number in standard form (SUM(a_i * 10^i)) and do a straightforward calculation. – mgamer Feb 7 '15 at 13:44
• Indeed, I believe that this question belongs in the Mathematics section of StackExchange. – bbgodfrey Feb 7 '15 at 14:00