Why Multiples of Three are Divisible by 3

  • Context: Undergrad 
  • Thread starter Thread starter Char. Limit
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
5 replies · 4K views
Char. Limit
Gold Member
Messages
1,222
Reaction score
23
Why is it that if the sum of the digits of a number is divisible by three, the number itself is also divisible by three?

I've tried to do it, but I can't get anywhere. This is the best I have.

Start with an integer x, which can also be written thus...

[tex]x=x_1+x_2\times10+x_3\times10^2+x_4\times10^3+...+x_i\times10^{i-1}[/tex]

Which gives us the digits of x. So, why is it that if...

[tex]\frac{\sum_{i=1}^{n} x_i}{3} \in \mathbb{Z}[/tex]

then...

[tex]\frac{x}{3} \in \mathbb{Z}[/tex]

for an n-digit number x?
 
Physics news on Phys.org
You should understand congruences:
[tex] \begin{array}{c}<br /> 1 \equiv 1 (\textrm{mod} \, 3) \\<br /> 10 \equiv 1 (\textrm{mod} \, 3) \\<br /> 10^{2} \equiv 1 (\textrm{mod} \, 3) \\<br /> \cdots \\<br /> 10^{n} \equiv 1 (\textrm{mod} \, 3)<br /> \end{array}[/tex]
Multiplying each of the congruences by [tex]a_{n}[/tex], where [tex]a_{n}[/tex] is the nth digit from the right (the first one being labeled by [tex]a_{0}[/tex]), and having in mind that:

[tex] x = \overline{a_{n} \cdots a_{1} a_{0}} = a_{n}*10^{n} + \cdots a_{1}*10 + a_{0}[/tex]

so

[tex] x \equiv (a_{n} + \cdots + a_{1} + a_{0}) (\textrm{mod} \, 3)[/tex]

Similarly, you can derive other criteria for divisibility.
 
CRGreathouse said:
Because you're working in base 10, and 10 = 1 (mod 3). If you were working in base 8, then the sum of the digits would be divisible by 7 iff the original number was.

Dickfore said:
You should understand congruences:
[tex] \begin{array}{c}<br /> 1 \equiv 1 (mod 3) \\<br /> 10 \equiv 1 (mod 3) \\<br /> 10^{2} \equiv 1 (mod 3) \\<br /> \dotslow \\<br /> 10^{n} \equiv 1 (mod 3)<br /> \end{array}[/tex]
Multiplying each of the congruences [tex]by a_{n}[/tex], where [tex]a_{n}[/tex] is the nth digit from the right (the first one being labeled by [tex]a_{0}[/tex]), and having in mind that:

[tex] x = \overline{a_{n} \dotslow a_{1} a_{0}} = a_{n}*10^{n} + \dotslow a_{1}*10 + a_0{}[/tex]

so

[tex] x \equiv (a_{n} + \dotslow + a_{1} + a_{0}) (mod 3)[/tex]

Similarly, you can derive other criteria for divisibility.

Thanks for the answers, I get it now. It makes total sense when you think about congruence, I guess.
 
Actually it is more like number (written in base 10) is divisible by 9 if sum of digits is divisible by 9, 3 is just a side effect.

In general, this rule works for numbers in base n being divisible by n-1 if sum of digits is divisible by n-1.
 
So the divisible-by-three rule would also work in base four, base seven, and any base 3n+1 then...

Thanks.