426 -> 4 + 2 + 6 = 12 12 (mod 3) = 0 (12 / 3 = 4) 426 (mod 3) = 0 (426 / 3 = 142)
This fact is actually quite simple to prove. Consider the breakdown of 426 to multiples of powers of 10:
426 = 4 * 100 + 2 * 10 + 6
Written another way:
426 = 4 * (99 + 1) + 2 * (9 + 1) + 6 = (4 * 99 + 2 * 9) + (4 + 2 + 6)This clearly shows that for 426 to be divisible by 3, (4 + 2 + 6) must be divisible for 3. If this isn't immediately obvious, recall that:
- If
X (mod N) = 0
, thenY * X (mod N) = 0
for any X and Y - If
X (mod N) = 0
andY (mod N) = 0
, thenX + Y (mod N) = 0
for any X and Y
P.S.:
- This theorem is, of course, an if and only if relation. IFF the sum of the digits is divisible by 3, the number is divisible by 3.
- Another rule says that if the sum of the digits is divisible by 9, the number is divisible by 9. Just replace 3 by 9 in the proof above, and this becomes obvious (the key fact is that 999..9 is always divisible by 3 and by 9).