Number Theory – Proving a Number is Divisible by 3 if Sum of Digits is Divisible by 3

elementary-number-theory

Here is the proof of the converse:

Iff a number $n$ is divisible by $3$, then the sum of its digits is also divisible by $3$.

Proof:

We know $n \mod 3 = 0$. By the basis representation theorem, $n$ can be re-written as $n_k10^k + n_{k-1}10^{k-1} + \cdots + 10n_1 + n_0 \equiv 0 \mod 3$. By the modular arithmetic addition rule, we can take $n_k10^k \mod 3 + n_{k-1}10^{k-1} \mod 3 + \cdots + 10n_1 \mod 3 + n_0 \mod 3$. But then we just get $n_k + n_{k-1} + \cdots + n_1 + n_0$, since $10 \mod 3 \equiv 1$.

Now suppose that the sum of the digits was divisible by 3. How can I prove that the representation in base $10$ is divisible by $3$?

Best Answer

The key point which you seem to have noted is that $10\equiv 1\pmod{3}$. This means that a number is congruent to the sum of its digits mod 3 because $10^k\equiv 1\pmod{3}$, which you also seem to have noted. Thus $n$ is divisible by $3$ (congruent to $0$ mod 3) if and only if the sum of its digits is. The same is true for other remainders modulo 3; a number has a remainder of $1$ when divided by $3$ if and only if the sum of its digits does, etc.

Your observation that $10^k\equiv 1\pmod{3}$ is the reason why it has been commented that you have already proved the result.

Related Question