# Difference between revisions of "Divisibility rules"

Mathfantasia (talk | contribs) |
Rockmanex3 (talk | contribs) m (Small organization changes) |
||

Line 1: | Line 1: | ||

These '''divisibility rules''' help determine when [[positive integer]]s are [[divisibility | divisible]] by particular other [[integer]]s. All of these rules apply for [[Base number| base-10]] ''only'' -- other bases have their own, different versions of these rules. | These '''divisibility rules''' help determine when [[positive integer]]s are [[divisibility | divisible]] by particular other [[integer]]s. All of these rules apply for [[Base number| base-10]] ''only'' -- other bases have their own, different versions of these rules. | ||

+ | ==Basics== | ||

− | == Divisibility Rule for 2 and Powers of 2 == | + | === Divisibility Rule for 2 and Powers of 2 === |

A number is divisible by <math>2^n</math> if and only if the last <math>{n}</math> digits of the number are divisible by <math>2^n</math>. Thus, in particular, a number is divisible by 2 if and only if its units digit is divisible by 2, i.e. if the number ends in 0, 2, 4, 6 or 8. | A number is divisible by <math>2^n</math> if and only if the last <math>{n}</math> digits of the number are divisible by <math>2^n</math>. Thus, in particular, a number is divisible by 2 if and only if its units digit is divisible by 2, i.e. if the number ends in 0, 2, 4, 6 or 8. | ||

[[Divisibility rules/Rule for 2 and powers of 2 proof | Proof]] | [[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 and only 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 and only 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 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 and only if the last <math>n</math> digits are divisible by that power of 5. | A number is divisible by <math>5^n</math> if and only if the last <math>n</math> digits are divisible by that power of 5. | ||

[[Divisibility rules/Rule for 5 and powers of 5 proof | Proof]] | [[Divisibility rules/Rule for 5 and powers of 5 proof | Proof]] | ||

− | == 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>). The alternating sum (<math>d_3d_2d_1 - d_6d_5d_4 + d_9d_8d_7 - \dots</math>) is divisible by 7 if and only if <math>N</math> is divisible by 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>). The alternating sum (<math>d_3d_2d_1 - d_6d_5d_4 + d_9d_8d_7 - \dots</math>) is divisible by 7 if and only if <math>N</math> is divisible by 7. | ||

Line 28: | Line 29: | ||

Rule 3: "Tail-End divisibility." Note. This only tells you if it is divisible and NOT the remainder. Take a number say 12345. Look at the last digit and add or subtract a multiple of 7 to make it zero. In this case we get 12380 or 12310 (both are acceptable; I am using the former). Lop off the ending 0's and repeat. 1238 - 28 ==> 1210 ==> 121 - 21 ==> 100 ==> 1 NOPE. Works in general with numbers that are relatively prime to the base (and works GREAT in binary). Here's one that works. 12348 - 28 ==> 12320 ==> 1232 +28 ==> 1260 ==> 126 + 14 ==> 14 YAY! | Rule 3: "Tail-End divisibility." Note. This only tells you if it is divisible and NOT the remainder. Take a number say 12345. Look at the last digit and add or subtract a multiple of 7 to make it zero. In this case we get 12380 or 12310 (both are acceptable; I am using the former). Lop off the ending 0's and repeat. 1238 - 28 ==> 1210 ==> 121 - 21 ==> 100 ==> 1 NOPE. Works in general with numbers that are relatively prime to the base (and works GREAT in binary). Here's one that works. 12348 - 28 ==> 12320 ==> 1232 +28 ==> 1260 ==> 126 + 14 ==> 14 YAY! | ||

− | == Divisibility Rule for 10 and Powers of 10== | + | === Divisibility Rule for 10 and Powers of 10=== |

If a number is power of 10, define it as a power of 10. The exponent is the number of zeros that should be at the end of a number for it to be divisible by that power of 10. | If a number is power of 10, define it as a power of 10. The exponent is the number of zeros that should be at the end of a number for it to be divisible by that power of 10. | ||

Line 34: | Line 35: | ||

A number needs to have 6 zeroes at the end of it to be divisible by 1,000,000 because <math>1,000,000=10^6</math>. | A number needs to have 6 zeroes at the end of it to be divisible by 1,000,000 because <math>1,000,000=10^6</math>. | ||

− | == Divisibility Rule for 11 == | + | === Divisibility Rule for 11 === |

A number is divisible by 11 if and only if the [[alternating sum]] of the digits is divisible by 11. | A number is divisible by 11 if and only if the [[alternating sum]] of the digits is divisible by 11. | ||

[[Divisibility rules/Rule for 11 proof | Proof]] | [[Divisibility rules/Rule for 11 proof | Proof]] | ||

− | == Divisibility Rule for 13 == | + | === General Rule for Composites === |

+ | A number is divisible by <math>N</math>, where the [[prime factorization]] of <math>N</math> is <math>p_1^{e_1}p_2^{e_2}\cdots p_n^{e_n}</math>, if the number is divisible by each of <math>p_1^{e_1}, p_2^{e_2},\ldots, p_n^{e_n}</math>. | ||

+ | |||

+ | ==== Example ==== | ||

+ | |||

+ | For the example, we will check if 55682168544 is divisible by 36. | ||

+ | |||

+ | The prime factorization of 36 to be <math>2^2\cdot 3^2</math>. Thus we must check for divisibility by 4 and 9 to see if it's divisible by 36. | ||

+ | |||

+ | * Since the last two digits, 44, of the number is divisible by 4, so is the entire number. | ||

+ | * To check for divisibility by 9, we look to see if the sum of the digits is divisible by 9. The sum of the digits is 54 which is divisible by 9. | ||

+ | |||

+ | Thus, the number is divisible by both 4 and 9 and must be divisible by 36. | ||

+ | |||

+ | ==Advanced== | ||

+ | |||

+ | === General Rule for Primes === | ||

+ | 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 <math>p</math>, there exists some number <math>q</math> such that an integer is divisible by <math>p</math> if and only if truncating the last digit, multiplying it by <math>q</math> and subtracting it from the remaining number gives us a result divisible by <math>p</math>. Divisibility rule 2 for 7 says that for <math>p = 7</math>, <math>q = 2</math>. The divisibility rule for 11 is equivalent to choosing <math>q = 1</math>. The divisibility rule for 3 is equivalent to choosing <math>q = -1</math>. These rules can also be found under the appropriate conditions in [[number base]]s other than 10. Also note that these rules exist in two forms: if <math>q</math> is replaced by <math>p - q</math> then subtraction may be replaced with addition. We see one instance of this in the divisibility rule for 13: we could multiply by 9 and subtract rather than multiplying by 4 and adding. | ||

+ | |||

+ | === Divisibility Rule for 13 === | ||

Rule 1: Truncate the last digit, multiply it by 4 and add it to the rest of the number. The result is divisible by 13 if and only if the original number was divisble by 13. This process can be repeated for large numbers, as with the second divisibility rule for 7. | Rule 1: Truncate the last digit, multiply it by 4 and add it to the rest of the number. The result is divisible by 13 if and only if the original number was divisble by 13. This process can be repeated for large numbers, as with the second divisibility rule for 7. | ||

Line 48: | Line 68: | ||

[[Divisibility rules/Rule 2 for 13 proof | Proof]] | [[Divisibility rules/Rule 2 for 13 proof | Proof]] | ||

− | ==Divisibility Rule for 17== | + | ===Divisibility Rule for 17=== |

Truncate the last digit, multiply it by 5 and subtract from the remaining leading number. The number is divisible if and only if the result is divisible. The process can be repeated for any number. | Truncate the last digit, multiply it by 5 and subtract from the remaining leading number. The number is divisible if and only if the result is divisible. The process can be repeated for any number. | ||

[[Divisibility rules/Rule for 17 proof | Proof]] | [[Divisibility rules/Rule for 17 proof | Proof]] | ||

− | ==Divisibility Rule for 19== | + | ===Divisibility Rule for 19=== |

Truncate the last digit, multiply it by 2 and add to the remaining leading number. The number is divisible if and only if the result is divisible. This can also be repeated for large numbers. | Truncate the last digit, multiply it by 2 and add to the remaining leading number. The number is divisible if and only if the result is divisible. This can also be repeated for large numbers. | ||

[[Divisibility rules/Rule for 19 proof | Proof]] | [[Divisibility rules/Rule for 19 proof | Proof]] | ||

− | ==Divisibility Rule for 29== | + | ===Divisibility Rule for 29=== |

Truncate the last digit, multiply it by 3 and add to the remaining leading number. The number is divisible if and only if the result is divisible. This can also be repeated for large numbers. | Truncate the last digit, multiply it by 3 and add to the remaining leading number. The number is divisible if and only if the result is divisible. This can also be repeated for large numbers. | ||

[[Divisibility rules/Rule for 29 proof | Proof]] | [[Divisibility rules/Rule for 29 proof | Proof]] | ||

− | ==Divisibility Rule for 49== | + | ===Divisibility Rule for 49=== |

Why 49? For taking pesky <math>7^2</math> out of a root. | Why 49? For taking pesky <math>7^2</math> out of a root. | ||

Line 78: | Line 98: | ||

[[Divisibility rules/Rule for 49 proof | Proof]] | [[Divisibility rules/Rule for 49 proof | Proof]] | ||

− | == | + | == Problems == |

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | |||

− | + | * Practice Problems on [https://artofproblemsolving.com/alcumus/ Alcumus] | |

− | * [[ | + | ** Divisibility (Prealgebra) |

+ | * [[2000 AMC 8 Problems/Problem 11]] | ||

+ | * [[2006 AMC 10B Problems/Problem 25]] | ||

## Revision as of 15:42, 11 June 2020

These **divisibility rules** help determine when positive integers are divisible by particular other integers. All of these rules apply for base-10 *only* -- other bases have their own, different versions of these rules.

## Contents

## Basics

### Divisibility Rule for 2 and Powers of 2

A number is divisible by if and only if the last digits of the number are divisible by . Thus, in particular, a number is divisible by 2 if and only if its units digit is divisible by 2, i.e. if the number ends in 0, 2, 4, 6 or 8.

### Divisibility Rule for 3 and 9

A number is divisible by 3 or 9 if and only 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 Rule for 5 and Powers of 5

A number is divisible by if and only if the last digits are divisible by that power of 5.

### Divisibility Rule for 7

Rule 1: Partition into 3 digit numbers from the right (). The alternating sum () is divisible by 7 if and only if is divisible by 7.

Rule 2: Truncate the last digit of , double that digit, and subtract it from the rest of the number (or vice-versa). is divisible by 7 if and only if the result is divisible by 7.

Rule 3: "Tail-End divisibility." Note. This only tells you if it is divisible and NOT the remainder. Take a number say 12345. Look at the last digit and add or subtract a multiple of 7 to make it zero. In this case we get 12380 or 12310 (both are acceptable; I am using the former). Lop off the ending 0's and repeat. 1238 - 28 ==> 1210 ==> 121 - 21 ==> 100 ==> 1 NOPE. Works in general with numbers that are relatively prime to the base (and works GREAT in binary). Here's one that works. 12348 - 28 ==> 12320 ==> 1232 +28 ==> 1260 ==> 126 + 14 ==> 14 YAY!

### Divisibility Rule for 10 and Powers of 10

If a number is power of 10, define it as a power of 10. The exponent is the number of zeros that should be at the end of a number for it to be divisible by that power of 10.

Example: A number needs to have 6 zeroes at the end of it to be divisible by 1,000,000 because .

### Divisibility Rule for 11

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

### General Rule for Composites

A number is divisible by , where the prime factorization of is , if the number is divisible by each of .

#### Example

For the example, we will check if 55682168544 is divisible by 36.

The prime factorization of 36 to be . Thus we must check for divisibility by 4 and 9 to see if it's divisible by 36.

- Since the last two digits, 44, of the number is divisible by 4, so is the entire number.
- To check for divisibility by 9, we look to see if the sum of the digits is divisible by 9. The sum of the digits is 54 which is divisible by 9.

Thus, the number is divisible by both 4 and 9 and must be divisible by 36.

## Advanced

### General Rule for Primes

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 , there exists some number such that an integer is divisible by if and only if truncating the last digit, multiplying it by and subtracting it from the remaining number gives us a result divisible by . Divisibility rule 2 for 7 says that for , . The divisibility rule for 11 is equivalent to choosing . The divisibility rule for 3 is equivalent to choosing . These rules can also be found under the appropriate conditions in number bases other than 10. Also note that these rules exist in two forms: if is replaced by then subtraction may be replaced with addition. We see one instance of this in the divisibility rule for 13: we could multiply by 9 and subtract rather than multiplying by 4 and adding.

### Divisibility Rule for 13

Rule 1: Truncate the last digit, multiply it by 4 and add it to the rest of the number. The result is divisible by 13 if and only if the original number was divisble by 13. This process can be repeated for large numbers, as with the second divisibility rule for 7.

Rule 2: Partition into 3 digit numbers from the right (). The alternating sum () is divisible by 13 if and only if is divisible by 13.

### Divisibility Rule for 17

Truncate the last digit, multiply it by 5 and subtract from the remaining leading number. The number is divisible if and only if the result is divisible. The process can be repeated for any number.

### Divisibility Rule for 19

Truncate the last digit, multiply it by 2 and add to the remaining leading number. The number is divisible if and only if the result is divisible. This can also be repeated for large numbers.

### Divisibility Rule for 29

Truncate the last digit, multiply it by 3 and add to the remaining leading number. The number is divisible if and only if the result is divisible. This can also be repeated for large numbers.

### Divisibility Rule for 49

Why 49? For taking pesky out of a root.

Useful until 2300. Round up to the nearest 50, call it , and subtract the original number, call this . If , it is divisible by 49.

Examples:

49. Round up: . Difference: . ? Yes!

1501. Round up: . Difference: . ? No!

1470. Round up: . Difference: . ? Yes!

## Problems

- Practice Problems on Alcumus
- Divisibility (Prealgebra)

- 2000 AMC 8 Problems/Problem 11
- 2006 AMC 10B Problems/Problem 25

## Resources

#### Books

- The AoPS Introduction to Number Theory by Mathew Crawford.
- The Art of Problem Solving by Sandor Lehoczky and Richard Rusczyk.

#### Classes