Divisibility by 12

Theorem
Let $N \in \N$ be expressed as:


 * $N = a_0 + a_1 10 + a_2 10^2 + \cdots + a_n 10^n$

Then $N$ is divisible by $12$ $a_0 - 2 a_1 + 4 \paren {\displaystyle \sum_{r \mathop = 2}^n a_r}$ is  divisible by $12$.

Proof
We first prove that $100 \times 10^n = 4 \pmod {12}$, where $n \in \N$.

Proof by induction:

For all $n \in \N$, let $P \paren n$ be the proposition:
 * $100 \times 10^n = 4 \pmod {12}$

Basis for the Induction
$P(0)$ says $100 = 4 \pmod {12}$, which is true as $100 = 8 \times 12 + 4$.

This is our basis for the induction.

Induction Hypothesis
Now we need to show that, if $P \paren k$ is true, where $k \ge 0$, then it logically follows that $P \paren{k+1}$ is true.

So this is our induction hypothesis:


 * $100 \times 10^k = 4 \pmod {12}$

Then we need to show:


 * $100 \times 10^{k+1} = 4 \pmod {12}$

Induction Step
This is our induction step:

So $P \paren k \implies P \paren{k+1}$ and the result follows by the Principle of Mathematical Induction.

Therefore:
 * $100 \times 10^n = 4 \pmod {12}$

And then:

Therefore:
 * $N = 0 \pmod {12} \iff a_0 - 2 a_1 + 4 \paren {\displaystyle \sum_{r \mathop = 2}^n a_r} = 0 \pmod {12}$

The result follows from Congruent to Zero if Modulo is Divisor