The divisibility rule of 3
While reviewing my daughter's homework, I got to think a little bit about the divisibility rule of 3. In elementary school we learn the rule, use it, and usually move on without asking why it works:
a number is divisible by \(3\) when the sum of its digits is divisible by \(3\).
For example, \(72\) is divisible by \(3\) because \(7 + 2 = 9\), and \(9\) is divisible by \(3\). The same happens with \(57\), since \(5 + 7 = 12\).
But why does the sum of the digits tell us anything about the original number?
A first hint: adding 9
One useful hint is that adding \(9\) often keeps the digit sum unchanged:
\[15 + 9 = 24\]
The digit sum of \(15\) is \(1 + 5 = 6\), and the digit sum of \(24\) is \(2 + 4 = 6\).
Another example:
\[71 + 9 = 80\]
Here, \(7 + 1 = 8\) and \(8 + 0 = 8\).
It is tempting to say that adding \(9\) always preserves the sum of the digits, but that is not quite true:
\[99 + 9 = 108\]
The digit sum goes from \(9 + 9 = 18\) to \(1 + 0 + 8 = 9\).
So the exact digit sum is not always preserved. What is preserved is the remainder after division by \(9\), and therefore also the remainder after division by \(3\).
That is the real reason the divisibility rule works.
The key idea
In decimal notation, each position is a power of \(10\):
\[abc = 100a + 10b + c\]
The important observation is that \(10\) leaves remainder \(1\) when divided by \(3\):
\[10 \equiv 1 \pmod{3}\]
Because of that, powers of \(10\) also leave remainder \(1\) when divided by \(3\):
\[100 \equiv 1 \pmod{3}\]
So we can replace each decimal place by \(1\) when we only care about divisibility by \(3\):
\[100a + 10b + c \equiv a + b + c \pmod{3}\]
In other words, a number and the sum of its digits have the same remainder when divided by \(3\).
That is why the rule works:
- if the digit sum is divisible by \(3\), the original number is divisible by \(3\);
- if the digit sum is not divisible by \(3\), the original number is not divisible by \(3\).
Checking with examples
Take \(72\):
\[72 \equiv 7 + 2 = 9 \equiv 0 \pmod{3}\]
So \(72\) is divisible by \(3\).
Take \(58\):
\[58 \equiv 5 + 8 = 13 \equiv 1 \pmod{3}\]
So \(58\) is not divisible by \(3\).
Why adding 9 felt related
The first intuition about adding \(9\) was still pointing in the right direction. Since \(9\) is divisible by \(3\), adding \(9\) cannot change whether a number is divisible by \(3\).
For any integer \(n\):
\[n + 9 \equiv n \pmod{3}\]
So adding \(9\) may change the exact digit sum, especially when carries are involved, but it does not change the number's divisibility by \(3\).
Generalizing the rule
This digit-sum rule is not exclusive to decimal numbers. It works in any base \(b\) where:
\[b \equiv 1 \pmod{3}\]
That means bases of the form:
\[b = 3N + 1\]
Decimal works because \(10 = 3 \cdot 3 + 1\).
Hexadecimal also works because \(16 = 3 \cdot 5 + 1\).
The deeper pattern is not about the symbol \(9\) itself. It is about the base being one more than a multiple of \(3\), which makes every positional value behave like \(1\) when we only care about remainders modulo \(3\).