Rule for Divisibility by 3
A number is divisible by 3 if the sum of its digits is divisible by 3. For large numbers this rule can be applied again to the result.
Examples
A.) 504: 5 + 0 + 4 = 9, so it is divisible by 3.
B.)19,869,854,568: 1+9+8+6+9+8+5+4+5+6+8 = 69, 6 + 9 = 15, 1 + 5 = 6, so it is divisible by 3.
Proof
For any integer "x" written as an· · · a3a2 a1a0 we will prove that if 3|(a0 + a1+ a2+ a3 ... + an), then 3|x and vice versa.
First, we can state that
x = a0 + a1×10 + a2×102 + a3×103... + an×10n
Next if we let s be the sum of its digits then
s = a0 + a1 + a2 + a3 + ... + an .
So
x - s = (a0 - a0) + (a1 × 10 - a1) + (a2×102 - a2) + ... + (an×10n - an)
= a1(10 - 1) + a2(102 - 1) + ... + an(10n - 1).
If we let bk = 10k - 1, then bk = 9...9 (9 occurs k times) and bk =32(1…1). Then we can rewrite the previous equation as
x - s = a1(b1)+ a2(b2)+ ... + an (bn)
It follows that all numbers bk are divisible by 3, so the numbers ak×bk are also divisible by 3. Therefore, the sum of all the numbers ak×bk (which is x-s) is also divisible by 3.
Since x-s is divisible by 3, if x is divisible by 3 then so is s and vice versa.