Difference between revisions of "Divisibility rules/Rule for 3 and 9 proof"
(→Proof) |
|||
Line 15: | Line 15: | ||
<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> | <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>) | + | Now we know that, since <math>10 - 1 = 9</math>, we have <math>10 \equiv 1</math> (mod <math>9</math>) and so we have <math> 10^{j}\equiv 1^{j}\equiv 1 \pmod{9} </math> for every <math>j</math>. |
− | Therefore | + | Therefore, we can write |
<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> | <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> |
Revision as of 08:46, 16 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
where is a digit for each . Then the numerical value of is given by
Now we know that, since , we have (mod ) and so we have for every .
Therefore, we can write
Therefore, we have
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 .