Saturday, 15 November 2025

Exercise (3.1).27

Show that a natural number is divisible by 3 if and only if the sum of the digits is divisible by 3.


A natural number $n$ is of the form

$$ n = (a_0 \times 10^0) +  (a_1 \times 10^1) +  (a_2 \times 10^2) +   \ldots + (a_m \times 10^m)  $$

where $m$ is an integer, and $a_i$ are the digits of the number in base 10.


Propositions 3.6 and 3.8 with $10 \equiv 1 \pmod 3$ allow us to reduce this as follows

$$ \begin{align} n & =  (a_0 \times 10^0) +  (a_1 \times 10^1) +  (a_2 \times 10^2) +   \ldots + (a_m \times 10^m) \\ \\ & \equiv  (a_0 \times 1^0) +  (a_1 \times 1^1) +  (a_2 \times 1^2) +   \ldots + (a_m \times 1^m)  \pmod 3 \\ \\ n & \equiv  a_0 + a_1 + a_2  +  \ldots + a_m  \pmod 3 \end{align} $$

($\implies$) If $n$ is divisible by 3, then $n \equiv 0 \pmod 3$. This means the sum of the digits must also be congruent to 0 modulo 0, that is, divisible by 3.

($\impliedby$) If the sum of digits is divisible by 3, then that sum is congruent to 0 modulo 3. That means $n \equiv 0 \pmod 3$, that is, $n$ is divisible by 3.


And so a natural number is divisible by 3 if and only if the sum of the digits is divisible by 3.