Difference between revisions of "Divisibility rules"
m (Renamed rules) |
(Proof for 9 rule) |
||
Line 16: | Line 16: | ||
== Divisibility Rule for 9 == | == Divisibility Rule for 9 == | ||
A number is divisible by 9 if the sum of its digits is divisible by 9. | A number is divisible by 9 if the sum of its digits is divisible by 9. | ||
+ | === Proof === | ||
+ | Modular arithmetic is the basis for several well-known divisibility tests. Consider, for example, the test for divisibility by <math>9</math>: | ||
+ | |||
+ | ''Let <math>N</math> be a positive integer. Then <math>N</math> is divisible by <math>9</math> if and only if the sum of the base-ten digits of <math>N</math> is divisible by <math>9</math>.'' | ||
+ | |||
+ | Arithmetic mod <math>9</math> can be used to give an easy proof of this criterion: | ||
+ | |||
+ | Suppose that the base-ten representation of <math>N</math> is | ||
+ | |||
+ | <math>N = a_k a_{k-1} \cdots a_2 a_1 a_0</math>, | ||
+ | |||
+ | 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>. | ||
+ | |||
+ | 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</math> (mod <math>9</math>) for every <math>j</math>. | ||
+ | |||
+ | 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> (mod <math>9</math>). | ||
+ | |||
+ | Therefore, we have | ||
+ | |||
+ | <math>N \equiv a_k + a_{k-1} + \cdots + a_1 + a_0</math> (mod <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>. | ||
+ | |||
Revision as of 15:59, 28 June 2006
These divisibility rules help determine when integers are divisible by particular other integers.
Contents
Divisibility Rule for 2 and Powers of 2
A number is divisible by if the last digits of the number are divisible by .
Divisibility Rule for 3
A number is divisible by 3 if the sum of its digits is divisible by 3.
Divisibility Rule for 5 and Powers of 5
A number is divisible by if the last n digits are divisible by that power of 5.
Divisibility Rule for 9
A number is divisible by 9 if the sum of its digits is divisible by 9.
Proof
Modular arithmetic is the basis for several well-known divisibility tests. Consider, for example, the test for divisibility by :
Let be a positive integer. Then is divisible by if and only if the sum of the base-ten digits of is divisible by .
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 ). So by the "exponentiation" property above, we have (mod ) for every .
Therefore, by repeated uses of the "addition" and "multiplication" properties, we can write
(mod ).
Therefore, we have
(mod ).
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 .
Divisibility Rule for 11
A number is divisible by 11 if the alternating sum of the digits is divisible by 11.
Divisibility Rule for 7
Rule 1: Partition into 3 digit numbers from the right (). If the alternating sum () is divisible by 7, then the number is divisible by 7.
Rule 2: Truncate the last digit of , and subtract twice that digit from the remaining number. If the result is divisible by 7, then the number is divisible by 7. This process can be repeated for large numbers.
Divisibility Rule for 13
See rule 1 for divisibility by 7. A number is divisible by 13 if the same specified sum is divisible by 13.