

Divisibility by Three
On this page we prove the theorem known from school that an integer is divisible by 3 if and only if the sum of its digits is divisible by 3. We intend our proof to be understandable for everyone who has basic familiarity with integer numbers and who is capable of concentrating his attention.
Let x be a positive integer with n+1 digits:x = a_{0} + a_{1}*10 + a_{2}*10^{2} + a_{3}*10^{3}... + a_{n}*10^{n}
Let s be the sum of its digits:s = a_{0} + a_{1} + a_{2} + a_{3} + ... + a_{n}
Now,x  s = (a_{0}  a_{0}) + (a_{1}*10  a_{1}) + (a_{2}*10^{2}  a_{2}) + ... + (a_{n}*10^{n}  a_{n})
x  s = a_{1}*(10  1) + a_{2}*(10^{2}  1) + ... + a_{n}*(10^{n}  1)
If we write b_{k} = 10^{k}  1, we will havex  s = a_{1}*b_{1} + a_{2}*b_{2} + ... + a_{n}*b_{n}
Notice that b_{k} = 9...9 (9 occurs k times).
Hence all the numbers b_{k} are divisible by 3.
Hence all the numbers a_{k}*b_{k} are divisible by 3.
Hence their sum (which is xs) is divisible by 3.
Take your time now to realize that (since xs is divisible by 3)
if x is divisible by 3 then so is s and vice versa.