# Why if the sum of a number's digits is divisible by 3, that no. is divisible by 3?

1. Jan 7, 2010

### Juwane

Two questions:

1. We add the digits of any number. If the sum is divisible by 3, then that number is divisible by 3. Why?

2. Does this work for a number of more than 2 digits?

2. Jan 7, 2010

### CRGreathouse

Re: Why if the sum of a number's digits is divisible by 3, that no. is divisible by 3

Yes.

Because 10 = 1 (mod 9).

Consider doing long division on a number:

__________
9) abcde...

Your first step will be to see if 9 goes into a. If it does, then the number is
abcde... = 9000... + bcde...
which is divisible by 9 exactly if bcde... is. Otherwise, see how many times 9 goes into ab (that is, 10a + b). Clearly at least a times, right? Then you'll write a above the bar and subtract 9a from 10a + b, which is a + b. But now you're just adding the digits up. You can continue this process, getting (a + b + c)de..., (a + b + c + d)e..., and so on. It's 'easy to see' that this works. A formal proof is by induction.

3. Jan 8, 2010

### elibj123

Re: Why if the sum of a number's digits is divisible by 3, that no. is divisible by 3

First prove by induction that every number of the form $$10^{n}-1$$ is divisible by 3. Then Notice that every number can be written via decimal representation:

$$x=\sum^{N}_{i=0}x_{i}10^{i}=\sum^{N}_{i=0}x_{i}+\sum^{N}_{i=0}x_{i}(10^{i}-1)$$

The second sum is a number divisible by three (you've proven it), so the only remaining condition for x to be divisible by three is that the first sum is. But that's just saying the sum of the digits is divisible by three.