Number theory problem divisible

1. Jan 29, 2012

yeland404

1. The problem statement, all variables and given/known data

Prove that n ℂ Z+ is divisible by 3( respectively 9). to show that if and only if the sum of its digits is divisible by 3

2. Relevant equations

3. The attempt at a solution

so n= 3q, q>3 that n$\equiv$0 mod 3
n=X1* 10^n+ x2*10^n-1......Xn
so need to prove(x1+x2+......Xn)$\equiv$0 mod 3, the how to prove the next step

2. Jan 29, 2012

Dick

Show 10^k=1 mod 3.

3. Jan 29, 2012

Deveno

and for extra credit, google "casting out nines" for a better explanation of why this works (the same theorem holds for the number 9, in fact, for the same reason).