Divisibility by 9

Theorem
A number $$n=a_0+a_110+a_210^2+\ldots+a_n10^n$$ is divisible by 9 if and only if the sum $$a_0+a_1+\ldots+a_n$$ of its digits is divisible by 9.

Direct Proof
If $$n$$ is divisible by 9, then

$$n\equiv0\mod{9}$$ $$\Leftrightarrow a_0+a_110+a_210^2+\ldots+a_n10^n\equiv0\mod{9}$$ $$\Leftrightarrow a_0+a_11+a_21^2+\ldots+a_n1^n\equiv0\mod{9}$$ (since $$10\equiv1\mod{9}$$) $$a_0+a_1+\ldots+a_n\equiv0\mod{9}$$ as desired.

Q.E.D.

Alternative Proof
It can be seen that this is a special case of Congruence of Sum of Digits to Base Less 1.

Remark
This same argument holds for divisibility by 3. The proof is exactly the same as the proof above, replacing all instances of 9 by 3.