Intuition for why repeated sum of digits of a number is concurrent modulo 9?

90 Views Asked by At

I have come across this question where I have to sum the digits of the number repeatedly until it reduces to single digit, for example 9998 can be reduced to 35 which then it can be reduced to 8. So, 8 is the answer.

There is correlation between 9998 and 8 as in, 9998 % 9 = 8 ( except when remainder is zero or the number itself is zero ), can someone give me the rough sketch of the proof or intuition?

Thanks much!

1

There are 1 best solutions below

1
On BEST ANSWER

In your case, we have $$9998 = (999 + 1)\cdot9 + (99 + 1)\cdot9 + (9 + 1)\cdot9 + 8 = 9\cdot(999 + 99 + 9) + 9 + 9 + 9 + 8$$ Adding up $9 + 9 + 9 + 8$, we have $$9\cdot(999 + 99 + 9) + 35 = 9\cdot(999 + 99 + 9) + (9 + 1)\cdot3 + 5$$ Factoring out the 9 again, $$9\cdot(999 + 99 + 9 + 3) + 3 + 5$$ Adding up $3 + 5$, $$9\cdot(999 + 99 + 9 + 3) + 8$$ Hopefully this shows where the digit adding came from.