## An integer is divisible by nine precisely when the sum of its decimal digits is divisible by nine

Prove that if $a = \sum_{i=0}^n a_i 10^i$ is any positive integer then $a = \sum_{i=0}^n a_i\ (\mod 9)$. Note that this is the usual arithmetic rule that the remained after division by 9 is the same as the sum of the decimal digits mod 9 – in particular an integer is divisible by 9 if and only if the sum of its digits is divisible by 9.)

Letting bars denote arithmetic mod 9, we have $\overline{a} = \overline{\sum_{i=0}^n a_i 10^i} = \sum_{i=0}^n \overline{a_i} \overline{10}^i = \sum_{i=0}^n \overline{a_i} \cdot 1$, and we’re done.