Difference between revisions of "Divisibility rules"

m (Divisibility Rule for 13: Proof needs quick finish)
Line 5: Line 5:
 
A number is divisible by <math>2^n</math> if the last <math>{n}</math> digits of the number are divisible by <math>2^n</math>.
 
A number is divisible by <math>2^n</math> if the last <math>{n}</math> digits of the number are divisible by <math>2^n</math>.
  
 +
[[Divisibility rules/Rule for 2 and powers of 2 proof | Proof]]
  
 
== Divisibility Rule for 3 and 9==
 
== Divisibility Rule for 3 and 9==
 
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.
 
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.
 +
 +
[[Divisibility rules/Rule for 3 and 9 proof | Proof]]
  
 
== Divisibility Rule for 5 and Powers of 5 ==
 
== Divisibility Rule for 5 and Powers of 5 ==
A number is divisible by <math>5^n</math> if the last n digits are divisible by that power of 5.
+
A number is divisible by <math>5^n</math> if the last <math>n</math> digits are divisible by that power of 5.
 
 
 
 
=== Proof ===
 
An understanding of [[Introduction to modular arithmetic | basic modular arithmetic]] is necessary for this proof.
 
 
 
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
+
[[Divisibility rules/Rule for 5 and powers of 5 proof | Proof]]
  
<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>.
 
 
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>.
 
  
 
== Divisibility Rule for 11 ==
 
== Divisibility Rule for 11 ==
 
A number is divisible by 11 if the alternating sum of the digits is divisible by 11.
 
A number is divisible by 11 if the alternating sum of the digits is divisible by 11.
  
 +
[[Divisibility rules/Rule for 11 proof | Proof]]
  
 
===Proof===
 
===Proof===
Line 55: Line 30:
  
 
== Divisibility Rule for 7 ==
 
== Divisibility Rule for 7 ==
Rule 1:  Partition <math>n</math> into 3 digit numbers from the right (<math>d_3d_2d_1,d_6d_5d_4,\dots</math>).  If the alternating sum (<math>d_3d_2d_1 - d_6d_5d_4 + d_9d_8d_7 - \dots</math>) is divisible by 7, then the number is divisible by 7.<br>
+
Rule 1:  Partition <math>n</math> into 3 digit numbers from the right (<math>d_3d_2d_1,d_6d_5d_4,\dots</math>).  If the alternating sum (<math>d_3d_2d_1 - d_6d_5d_4 + d_9d_8d_7 - \dots</math>) is divisible by 7, then the number is divisible by 7.
<br>
+
 
 +
[[Divisibility rules/Rule 1 for 7 proof | Proof]]
 +
 
 
Rule 2:  Truncate the last digit of <math>{n}</math>, and double that digit, subtracting the rest of the number from the doubled last digit.  If the absolute value of the result is a multiple of 7, then the number itself is. <br>
 
Rule 2:  Truncate the last digit of <math>{n}</math>, and double that digit, subtracting the rest of the number from the doubled last digit.  If the absolute value of the result is a multiple of 7, then the number itself is. <br>
 +
 +
[[Divisibility rules/Rule 2 for 7 proof | Proof]]
  
 
===Proof for Rule 2:===
 
===Proof for Rule 2:===
Line 65: Line 44:
 
== Divisibility Rule for 13 ==
 
== Divisibility Rule for 13 ==
 
Multiply the last digit by 4 and add it to the rest of the number.  This process can be repeated for large numbers, as with the second divisibility rule for 7.   
 
Multiply the last digit by 4 and add it to the rest of the number.  This process can be repeated for large numbers, as with the second divisibility rule for 7.   
 +
 +
[[Divisibility rules/Rule for 13 proof | Proof]]
  
 
===Proof===
 
===Proof===

Revision as of 21:51, 15 August 2006

These divisibility rules help determine when integers are divisible by particular other integers.


Divisibility Rule for 2 and Powers of 2

A number is divisible by $2^n$ if the last ${n}$ digits of the number are divisible by $2^n$.

Proof

Divisibility Rule for 3 and 9

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

Divisibility Rule for 5 and Powers of 5

A number is divisible by $5^n$ if the last $n$ digits are divisible by that power of 5.

Proof


Divisibility Rule for 11

A number is divisible by 11 if the alternating sum of the digits is divisible by 11.

Proof

Proof

$10\equiv -1\pmod{11}$. Since the number is in base 10, as we assume, the digits would be of powers of 10, or in mod 11, powers of -1. The number 3806 thus becomes:

$3\cdot (-1)^3+8\cdot (-1)^2+0\cdot (-1)^1+6\cdot (-1)^0=-3+8-0+6\equiv 0\pmod{11}$.

Divisibility Rule for 7

Rule 1: Partition $n$ into 3 digit numbers from the right ($d_3d_2d_1,d_6d_5d_4,\dots$). If the alternating sum ($d_3d_2d_1 - d_6d_5d_4 + d_9d_8d_7 - \dots$) is divisible by 7, then the number is divisible by 7.

Proof

Rule 2: Truncate the last digit of ${n}$, and double that digit, subtracting the rest of the number from the doubled last digit. If the absolute value of the result is a multiple of 7, then the number itself is.

Proof

Proof for Rule 2:

The divisibility rule would be $2n_0-k$, where $k=d_110^0+d_210^1+d_310^2+...$, where $d_{n-1}$ is the nth digit from the right (NOT the left) and we have $k-2n_0\equiv 2n_0+6k$ and since 2 is relatively prime to 7, $2n_0+6k\equiv n_0+3k\pmod{7}$. Then yet again $n_0+3k\equiv n_0+10k\pmod{7}$, and this is equivalent to our original number.

Divisibility Rule for 13

Multiply the last digit by 4 and add it to the rest of the number. This process can be repeated for large numbers, as with the second divisibility rule for 7.

Proof

Proof

Let $n = d_0\cdot10^0 + d_1\cdot 10^1 +d_2\cdot 10^2 + \ldots$ be a positive integer with units digit $d_0$, tens digit $d_1$ and so on. Then $k=d_110^0+d_210^1+d_310^2+...$ is the result of truncating the last digit from $n$. Note that $n = 10k + d_0 \equiv d_0 - 3k \pmod 13$. Now $n \equiv 0 \pmod 13$ if and only if $4n \equiv 0 \pmod 13$, from which the rule follows ... (someone add the last 2 lines of pf.)

More general note

For every prime number other than 2 and 5, there exists a rule similar to rule 2 for divisibility by 7. For a general prime $p$, there exists some number $q$ such that an integer is divisible by $p$ if and only if truncating the last digit, multiplying it by $q$ and subtracting it from the remaining number gives us a result divisible by $p$. Divisibility rule 2 for 7 says that for $p = 7$, $q = 2$. The divisibility rule for 11 is equivalent to choosing $q = 1$. The divisibility rule for 3 is equivalent to choosing $q = -1$. These rules can also be found under the appropriate conditions in number bases other than 10.


Example Problems


Resources

Books

Classes


See also