Divisibility by 9

Theorem

A number expressed in decimal notation is divisible by $9$ if and only if the sum of its digits is divisible by $9$.

That is:

$N = \sqbrk {a_0 a_1 a_2 \ldots a_n}_{10} = a_0 + a_1 10 + a_2 10^2 + \cdots + a_n 10^n$ is divisible by $9$
$a_0 + a_1 + \ldots + a_n$ is divisible by $9$.

Corollary

A number expressed in decimal notation is divisible by $3$ if and only if the sum of its digits is divisible by $3$.

That is:

$N = \sqbrk {a_0 a_1 a_2 \ldots a_n}_{10} = a_0 + a_1 10 + a_2 10^2 + \cdots + a_n 10^n$ is divisible by $3$
$a_0 + a_1 + \ldots + a_n$ is divisible by $3$.

Proof 1

Let $N$ be divisible by $9$.

Then:

 $\displaystyle N$ $\equiv$ $\displaystyle 0 \pmod 9$ $\displaystyle \leadstoandfrom \ \$ $\displaystyle a_0 + a_1 10 + a_2 10^2 + \cdots + a_n 10^n$ $\equiv$ $\displaystyle 0 \pmod 9$ $\displaystyle \leadstoandfrom \ \$ $\displaystyle a_0 + a_1 1 + a_2 1^2 + \cdots + a_n 1^n$ $\equiv$ $\displaystyle 0 \pmod 9$ as $10 \equiv 1 \pmod 9$ $\displaystyle \leadstoandfrom \ \$ $\displaystyle a_0 + a_1 + \cdots + a_n$ $\equiv$ $\displaystyle 0 \pmod 9$

$\blacksquare$

Proof 2

This is a special case of Congruence of Sum of Digits to Base Less 1.

$\blacksquare$