Difference between revisions of "Divisibility rules/Rule for 3 and 9 proof"
(→Proof) |
|||
Line 1: | Line 1: | ||
− | A [[number]] is [[divisible]] by 3 or 9 if the sum of its [[digit]]s is divisible by 3 or 9, respectively. Note that this does not work for higher powers of 3. For instance, the sum of the digits of 1899 is divisible by 27, but 1899 is not itself divisible by 27. | + | A [[number]] <math>N</math> is [[divisible]] by 3 or 9 if the sum of its [[digit]]s is divisible by 3 or 9, respectively. Note that this does not work for higher powers of 3. For instance, the sum of the digits of 1899 is divisible by 27, but 1899 is not itself divisible by 27. |
== Proof == | == Proof == | ||
Line 9: | Line 9: | ||
Suppose that the [[base numbers | base-ten]] representation of <math>N</math> is | Suppose that the [[base numbers | base-ten]] representation of <math>N</math> is | ||
− | <math>N = a_k a_{k-1} \cdots a_2 a_1 a_0</math>, | + | <center><math>N = a_k a_{k-1} \cdots a_2 a_1 a_0</math>,</center> |
where <math>a_i</math> is a digit for each <math>i</math>. Then the numerical value of <math>N</math> is given by | where <math>a_i</math> is a digit for each <math>i</math>. Then the numerical value of <math>N</math> is given by | ||
− | <math>N = a_k \cdot 10^k + a_{k-1} \cdot 10^{k-1} + \cdots + a_1 \cdot 10^1 + a_0 \cdot 10^0</math>. | + | <center><math>N = a_k \cdot 10^k + a_{k-1} \cdot 10^{k-1} + \cdots + a_1 \cdot 10^1 + a_0 \cdot 10^0</math>.</center> |
− | Now we know that, since <math>10 - 1 = 9</math>, we have <math>10 \equiv 1</math> (mod <math>9</math>). So by the "exponentiation" property above, we have <math>10^j \equiv 1^j \equiv 1 | + | Now we know that, since <math>10 - 1 = 9</math>, we have <math>10 \equiv 1</math> (mod <math>9</math>). So by the "exponentiation" property above, we have <math> 10^{j}\equiv 1^{j}\equiv 1 \pmod{9} </math> for every <math>j</math>. |
Therefore, by repeated uses of the "addition" and "multiplication" properties, we can write | Therefore, by repeated uses of the "addition" and "multiplication" properties, we can write | ||
− | <math>a_k \cdot 10^k + a_{k-1} \cdot 10^{k-1} + \cdots + a_1 \cdot 10^1 + a_0 \cdot 10^0 \equiv a_k \cdot 1 + a_{k-1} \cdot 1 + \cdots + a_1 \cdot 1 + a_0 \cdot 1</math> | + | <center><math>a_k \cdot 10^k + a_{k-1} \cdot 10^{k-1} + \cdots + a_1 \cdot 10^1 + a_0 \cdot 10^0 \equiv a_k \cdot 1 + a_{k-1} \cdot 1 + \cdots + a_1 \cdot 1 + a_0 \cdot 1 \pmod{9} </math>.</center> |
Therefore, we have | Therefore, we have | ||
− | <math>N \equiv a_k + a_{k-1} + \cdots + a_1 + a_0</math> | + | <center><math>N \equiv a_k + a_{k-1} + \cdots + a_1 + a_0 \pmod{9}</math>.</center> |
That is, <math>N</math> differs from the sum of its digits by a multiple of <math>9</math>. It follows, then, that <math>N</math> is a multiple of <math>9</math> if and only if the sum of its digits is a multiple of <math>9</math>. | That is, <math>N</math> differs from the sum of its digits by a multiple of <math>9</math>. It follows, then, that <math>N</math> is a multiple of <math>9</math> if and only if the sum of its digits is a multiple of <math>9</math>. | ||
− | Since we also have <math>10 \equiv 1 \pmod 3</math>, the same proof also gives the divisibility rule for 3. The proof fails for 27 because <math>10 \not\equiv 1 \pmod{27}</math>. | + | Since we also have <math>10 \equiv 1 \pmod{3}</math>, the same proof also gives the divisibility rule for 3. The proof fails for 27 because <math>10 \not\equiv 1 \pmod{27}</math>. |
== See also == | == See also == | ||
* [[Divisibility rules | Back to divisibility rules]] | * [[Divisibility rules | Back to divisibility rules]] |
Revision as of 22:50, 15 August 2006
A number is divisible by 3 or 9 if the sum of its digits is divisible by 3 or 9, respectively. Note that this does not work for higher powers of 3. For instance, the sum of the digits of 1899 is divisible by 27, but 1899 is not itself divisible by 27.
Proof
An understanding of basic modular arithmetic is necessary for this proof.
Arithmetic mod can be used to give an easy proof of this criterion:
Suppose that the base-ten representation of is
![$N = a_k a_{k-1} \cdots a_2 a_1 a_0$](http://latex.artofproblemsolving.com/0/7/0/0704e02977f4ffc5d660d78d057acec0e99f700c.png)
where is a digit for each
. Then the numerical value of
is given by
![$N = a_k \cdot 10^k + a_{k-1} \cdot 10^{k-1} + \cdots + a_1 \cdot 10^1 + a_0 \cdot 10^0$](http://latex.artofproblemsolving.com/0/7/9/079296cd7f9102410f3f960d24a53ced70fd1ae2.png)
Now we know that, since , we have
(mod
). So by the "exponentiation" property above, we have
for every
.
Therefore, by repeated uses of the "addition" and "multiplication" properties, we can write
![$a_k \cdot 10^k + a_{k-1} \cdot 10^{k-1} + \cdots + a_1 \cdot 10^1 + a_0 \cdot 10^0 \equiv a_k \cdot 1 + a_{k-1} \cdot 1 + \cdots + a_1 \cdot 1 + a_0 \cdot 1 \pmod{9}$](http://latex.artofproblemsolving.com/b/8/e/b8e579dd3990e7b7f3384701400a4e4f7640d81c.png)
Therefore, we have
![$N \equiv a_k + a_{k-1} + \cdots + a_1 + a_0 \pmod{9}$](http://latex.artofproblemsolving.com/c/3/b/c3b22803a975858194acd5241c6477e66b9feb5a.png)
That is, differs from the sum of its digits by a multiple of
. It follows, then, that
is a multiple of
if and only if the sum of its digits is a multiple of
.
Since we also have , the same proof also gives the divisibility rule for 3. The proof fails for 27 because
.