<pre>
A number is divisible by three iff the sum of its digits is divisible by three.
First, prove 10^N <code> 1 mod 3 for all integers N ></code> 0.
1 <code> 1 mod 3. 10 </code> 1 mod 3. 10^N <code> 10^(N-1) * 10 </code> 10^(N-1) mod 3.
QED by induction.
Now let D[[0]] be the units digit of N, D[[1]] the tens digit, etc.
Now N <code> Summation From k</code>0 to k=inf of D[[k]]*10^k.
Therefore N mod 3 <code> Summation from k</code>0 to k=inf of D[[k]] mod 3. QED
</pre>
