Proving the sum of digits is always 9 if number is divisible by 9

The other day, I was attempting to prove that if the sum of all the digits equal to then the number is divisible by . E.g. the number — the sum is equal to nine ( ) and we know for a fact that .

Let be an arbitrary number with an arbitrary number of digits. In expanded form, we can write

Now, assuming that the sum of all the digits equals to , we can write

But now I'm stuck. The proof is complete if we can somehow factor the number by breaking out a but I don't really see how I'm supposed to go about to achieve that. The binomial theorem doesn't prove very fruitful (I think) when substituting .

Re: Proving the sum of digits is always 9 if number is divisible by 9

I am gonna try modular arithmetic...

Re: Proving the sum of digits is always 9 if number is divisible by 9

Yep, modular arithmetic was the key, I managed to prove it!

Re: Proving the sum of digits is always 9 if number is divisible by 9

Though it is really the same as working "mod 10" you can show directly that 10^n divided by 9 has remainder 1 for any n. 10^n= 999...9 (with n "9"s) plus 1.

Re: Proving the sum of digits is always 9 if number is divisible by 9

Sorry bro.If you solve it then let me know.