Proving a five digit number is divisible by 3 if the sum of its digits is divisible by 3

divisibilityelementary-number-theoryproof-explanationproof-writingsolution-verification

I'm trying to construct a direct proof to show that a five-digit number is divisible by 3 if the sum of its five digits is divisible by 3. What I was thinking of doing was expanding the five-digit number, but then I get stuck in figuring out how to bring in congruence modulo n and the definition of divides into my proof. Any help is appreciated in making a clear and concise proof. Here's what I have so far:

Suppose that you have a five-digit number $n$ that is written $abcde$. Then,

\begin{align*}
n&=10^4a+10^3b+10^2c+10d+e\\
&=(9999+1)a+(999+1)b+(99+1)c+(9+1)d+e\\
&=(9999a+999b+99c+9d)+(a+b+c+d+e)\\
&=3(3333a+333b+33c+3d)+(a+b+c+d+e)\\
\end{align*}

Best Answer

Using congruence:

Since $3 \equiv 0 \pmod 3$, from your working, we have $n \equiv a+b+c+d+e \pmod{3}$

Using direct division.

$$n-(a+b+c+d+e) = 3(3333a+333b+33c+3d)$$

Hence $n-(a+b+c+d+e)=3\alpha$ is a multiple of $3$. If $n$ is a multiple of $3$, then we can write $n = 3\beta$, and we have $a+b+c+d+e=3(\beta-\alpha)$. Similarly if $a+b+c+d+e$ is a multiple of $3$.

In general, if $n = \sum_{i=0}^d n_i \cdot 10^{i}$, then since $10 \equiv 1 \pmod{3}$, we have $n \equiv \sum_{i=0}^d n_i$.

Related Question