1. ## numbertheory

hi can anyone help me with this problem in number theory with regards to prime number? i don't know how to proive this..can someone help?

Prove that an integer is divisible by 3 if and only if the sum of its digits is divbisble by 3. Prove that an integer is divisible by 9 if and only if the sum of its digits is divisible by 9...thanls

2. Let $\displaystyle N=[a_na_{n-1}...a_1a_0]_{10}$. Then $\displaystyle N=10^na_n+10^{n-1}a_{n-1}+...10a_1+a_0$. Notice that $\displaystyle 10 \equiv 1 \pmod 9$ so $\displaystyle 10^n \equiv 1 \pmod 9$ and $\displaystyle N=10^na_n+10^{n-1}+...10a_1+a_0 \equiv a_n+a_{n-1}+...+a_1+a_0 \pmod 9$. That is, $\displaystyle 9 \mid N$ iff $\displaystyle 9 \mid a_n+a_{n-1}+...+a_1+a_0$

If you aren't familiar with congruences, notice that:
$\displaystyle N=10^na_n+10^{n-1}a_{n-1}+...10a_1+a_0$$\displaystyle = \left ((10^n-1)a_n+(10^{n-1}-1)a_{n-1}+..+9a_1 \right)+\left (a_n+a_{n-1}+...+a_1+a_0 \right ) For divisibility by 3, notice that \displaystyle 10 \equiv 1 \pmod 3 and argue in the same way as in the case with divisibility by 9. 3. Originally Posted by DavidEriksson Let \displaystyle N=[a_na_{n-1}...a_1a_0]_{10}. Then \displaystyle N=10^na_n+10^{n-1}a_{n-1}+...10a_1+a_0. Notice that \displaystyle 10 \equiv 1 \pmod 9 so \displaystyle 10^n \equiv 1 \pmod 9 and \displaystyle N=10^na_n+10^{n-1}+...10a_1+a_0 \equiv a_n+a_{n-1}+...+a_1+a_0 \pmod 9. That is, \displaystyle 9 \mid N iff \displaystyle 9 \mid a_n+a_{n-1}+...+a_1+a_0 If you aren't familiar with congruences, notice that: \displaystyle N=10^na_n+10^{n-1}a_{n-1}+...10a_1+a_0$$\displaystyle = \left ((10^n-1)a_n+10^{n-1}a_{n-1}+..+9a_1 \right)+\left (a_n+a_{n-1}+...+a_1+a_0 \right )$

For divisibility by 3, notice that $\displaystyle 10 \equiv 1 \pmod 3$ and argue in the same way as in the case with divisibility by 9.

thank you very much for the reply..Dave...really thanks