Condition of an integer divisible by $3$

122 Views Asked by At

Prove that an integer $n$ is divisible by $3$ if and only the sum of it's digits is divisible by $3$. This how I proceeded $n=\overline{a_1a_2...a_k}$ Now we get $$n=a_1\cdot10^k+a_2\cdot10^{(k-1)}+....+a_k$$ Then I find no clue.

2

There are 2 best solutions below

0
On BEST ANSWER

Hint:

$n=a_k(9+1)^k + a_{k-1}(9+1)^{k-1}+........a_1(9+1)^1 +a_0.$

Use binomial expansion of $(9+1)^i$, $i=1,2,..k.$

0
On

$$10\bmod3=100\bmod3=1000\bmod3=\cdots=1,$$

$$ab\bmod c=(a\bmod c)(b\bmod c),$$

$$(a+b)\bmod c\equiv(a\bmod c+b\bmod c)\mod c.$$