I have come across an interesting property of the number 9, which some people call it casting out nines.
This is the property: If any number is divisible by 9, then you can keep adding the digits until you get a 9. For example 9117 is divisible by 9, because 9+1+1+7=18, then from the 18 we can see that 1+8=9. But 9113 is not divisible by 9, because 9+1+1+3=14, and then from the 14 we deduce 1+4=5 which is the remainder when this number, 9113, is divided by 9.
My question is: Is there a theorem that summarises this concept? If the theorem exists, then what is its proof?
Thanks in anticipation.
The basic idea here is that $10\equiv 1\bmod 9$, which means that $10^n\equiv 1^n\equiv 1\bmod 9$. (see also comment at end)
This means that $$\sum_{r=0}^Na_r10^r\equiv \sum_{r=0}^Na_r \bmod 9$$because all the powers of $10$ reduce to $1$. If you were writing numbers in base $13$ you'd likewise be able to case out twelves, for example.
I don't think this is quite in the answers already given.
This works because reducing modulo $9$ is a homomorphism when applied to the additive group of integers