# Thread: show 3|n iff 3|s

1. ## show 3|n iff 3|s

hey! the question is as follows:

Show that 3|n if and only if 3|s, where s is the sum of the digits of n (expressed as usual in base 10).

i was wondering if some one could please give me a hint as how to start off or give me a push in the right direction as i don't have any idea how to start(go about the question).
However, i do know that i need to show that 3|s and if this is true then 3|n will hold true as 3|n <=> 3|s.

plus i know that

n = ($\displaystyle a_k$) * ($\displaystyle 10^k$) + (a_(k-1)) * (10^(k-1)) + ... + a * 10 + ($\displaystyle a_0$) * $\displaystyle 10^0$

and

s= ($\displaystyle a_k$) + (a_(k-1)) + ... + a + ($\displaystyle a_0$)

oh and i was thinking that i may need to use the definition of divisibility where x|y <=> y = xn as

3 | ($\displaystyle a_k$) + (a_(k-1)) + ... + a + ($\displaystyle a_0$) <=> ($\displaystyle a_k$) + (a_(k-1)) + ... + a + ($\displaystyle a_0$) = 3 m
but then once again im lost in what to do

thankyou very much,
from an extremely stressed CoCo_RoAcH

2. Originally Posted by CoCo_RoAcH
hey! the question is as follows:

Show that 3|n if and only if 3|s, where s is the sum of the digits of n (expressed as usual in base 10).

i was wondering if some one could please give me a hint as how to start off or give me a push in the right direction as i don't have any idea how to start(go about the question).
However, i do know that i need to show that 3|s and if this is true then 3|n will hold true as 3|n <=> 3|s.

plus i know that

n = ($\displaystyle a_k$) * ($\displaystyle 10^k$) + (a_(k-1)) * (10^(k-1)) + ... + a * 10 + ($\displaystyle a_0$) * $\displaystyle 10^0$

and

s= ($\displaystyle a_k$) + (a_(k-1)) + ... + a + ($\displaystyle a_0$)

oh and i was thinking that i may need to use the definition of divisibility where x|y <=> y = xn as

3 | ($\displaystyle a_k$) + (a_(k-1)) + ... + a + ($\displaystyle a_0$) <=> ($\displaystyle a_k$) + (a_(k-1)) + ... + a + ($\displaystyle a_0$) = 3 m
but then once again im lost in what to do

thankyou very much,
from an extremely stressed CoCo_RoAcH
So:

$\displaystyle n \text{ mod } 3=\sum (a_i \text{ mod } 3) (10^i \text{ mod } 3)=\sum (a_i \text{ mod } 3)=\left(\sum a_i\right) \text{ mod } 3$

CB

3. Originally Posted by CaptainBlack
So:

$\displaystyle n \text{ mod } 3=\sum (a_i \text{ mod } 3) (10^i \text{ mod } 3)=\sum (a_i \text{ mod } 3)=\left(\sum a_i\right) \text{ mod } 3$

CB
Hey CaptainBlack
thankyou very much for that formula but i won't be able to use it as we haven't learnt it.

is there another way to start this question?

thankyou, CoCo_RoAcH