====== Divisibility Rules ====== {{anchor:divisibility_rules}} ^ Can divided by ^ If ^ Example ^ ^ 1 | No specific condition. | $ \text{Any integer is divisible by } 1 $ | ^ 2 | The last digit is even (0, 2, 4, 6, or 8) | $ 1,294 \to 4 \text{ is even.} $ | ^ 3 | The sum of the digits must be divisible by 3. | $ 609 → 6 + 0 + 9 = 15 \text{ which is clearly divisible by 3} $ | ^ ::: | Subtract the quantity of the digits 2, 5, and 8 in the number from the quantity of the digits 1, 4, and 7 in the number. The result must be divisible by 3. | $ 16,499,205,854,376 \text{has four of the digits 1, 4 and 7} \\ \text{and four of the digits 2, 5 and 8; Since } 4 − 4 = 0 \\ \text{is a multiple of 3, the number 16,499,205,854,376 is divisible by 3} $ | ^ ::: | Subtracting 2 times the last digit from the rest gives a multiple of 3. | $ 405 \to 40 - 5 \times 2 = 40 - 10 = 30 = 3 \times 10 $ | ^ 4 | The last two digits form a number that is divisible by 4. | $ 40,832 \to 32 \text{ is divisible by 4} $ | ^ ::: | If the tens digit is even, the ones digit must be 0, 4, or 8. \\ If the tens digit is odd, the ones digit must be 2 or 6. | $ 40,832 \to 3 \text{ is odd, and the last digit is } 2 $ | ^ ::: | The sum of the ones digit and double the tens digit is divisible by 4. | $ 40,832 \to 2 × 3 + 2 = 8 \text{ which is divisible by} 4 $ | ^ 5 | The last digit is 0 or 5. | $ 495 \to \text{ the last digit is 5} $ | ^ 6 | It is divisible by 2 and by 3. | $ 1,458 \to 1 + 4 + 5 + 8 = 18 \text{so it is divisible by 3 and the last digit is even,} \\ \text{hence the number is divisible by 6.} $ | ^ ::: | Sum the ones digit, 4 times the 10s digit, 4 times the 100s digit, 4 times the 1000s digit, etc. If the result is divisible by 6, so is the original number. (Works because $ 10^{n}=4 \pmod 6 \text{ for } 𝑛 > 1 $ | $ 1,458 \to (4 × 1) + (4 × 4) + (4 × 5) + 8 = 4 + 16 + 20 + 8 = 48 $ | ^ 7 | Forming an alternating sum of blocks of three from right to left gives a multiple of 7 | $ 1,369,851 \to 851 − 369 + 1 = 483 = 7 × 69 $ | ^ ::: | Adding 5 times the last digit to the rest gives a multiple of 7. (Works because 49 is divisible by 7.) | $ 483 \to 48 + (3 × 5) = 63 = 7 × 9 $ | ^ ::: | Subtracting 2 times the last digit from the rest gives a multiple of 7. (Works because 21 is divisible by 7.) | $ 483 \to 48 − (3 × 2) = 42 = 7 × 6 $ | ^ ::: | Subtracting 9 times the last digit from the rest gives a multiple of 7. (Works because 91 is divisible by 7.) | $ 483 \to 48 − (3 × 2) = 42 = 7 × 6 $ | ^ ::: | Adding 3 times the first digit to the next and then writing the rest gives a multiple of 7. (This works because 10a + b − 7a = 3a + b; the last number has the same remainder as 10a + b.) | $ 483 \to 4 × 3 + 8 = 20 \\ 203 \to 2 × 3 + 0 = 6 \\ 63 \to 6 × 3 + 3 = 21 $ | ^ ::: | Adding the last two digits to twice the rest gives a multiple of 7. (Works because 98 is divisible by 7.) | $ 483,595 \to 95 + (2 × 4835) = 9765 \\ 65 + (2 × 97) = 259 \to 59 + (2 × 2) = 63 $ | ^ ::: | Multiply each digit (from right to left) by the digit in the corresponding position in this pattern (from left to right): 1, 3, 2, −1, −3, −2 (repeating for digits beyond the hundred-thousands place). Adding the results gives a multiple of 7. | $ 483,595 \to (4 × (−2)) + (8 × (−3)) + (3 × (−1)) \\ + (5 × 2) + (9 × 3) + (5 × 1) = 7 $ | ^ ::: | Compute the remainder of each digit pair (from right to left) when divided by 7. Multiply the rightmost remainder by 1, the next to the left by 2 and the next by 4, repeating the pattern for digit pairs beyond the hundred-thousands place. Adding the results gives a multiple of 7. | $ 194,536 \to 19|45|36 \to (5 \times 4) + (3 \times 2) + (1 \times 1) = 27 \\ \text{ so it is not divisible by 7 } \\ 204,540 \to 20|45|40 \to (6 \times 4) + (3 \times 2) + (5 \times 1) = 35 \\ \text{ so it is divisible by 7.} $ | ^ 8 | If the hundreds digit is even, the number formed by the last two digits must be divisible by 8. | $ 624 \to 24 $ | ^ ::: | If the hundreds digit is odd, the number obtained by the last two digits must be 4 times an odd number. | $ 352 \to 52 = 4 \times 13 $ | ^ ::: | Add the last digit to twice the rest. The result must be divisible by 8. | $ 56 \to (5 × 2) + 6 = 16 $ | ^ ::: | The last three digits are divisible by 8. | $ 34,152 \to \text{Examine divisibility of just 152} \to 19 × 8 $ | ^ ::: | The sum of the ones digit, double the tens digit, and four times the hundreds digit is divisible by 8. | $ 34,152 \to 4 × 1 + 5 × 2 + 2 = 16 $ | ^ 9 | The sum of the digits must be divisible by 9 | $ 2,880 \to 2 + 8 + 8 + 0 = 18: 1 + 8 = 9 $ | ^ ::: | Subtracting 8 times the last digit from the rest gives a multiple of 9. (Works because 81 is divisible by 9) | $ 2,880 \to 288 - 0 \times 8 = 288 - 0 = 288 = 9 \times 32 $ | ^ 10 | The last digit is 0.[3] | $ 130 \to \text{ the ones digit is 0.} $ | ^ ::: | It is divisible by 2 and by 5 | $ 130 \to \text{ it is divisible by 2 and by 5} $ | ^ 11 | Form the alternating sum of the digits, or equivalently sum(odd) - sum(even). The result must be divisible by 11. | $ 918,082 \to 9 − 1 + 8 − 0 + 8 − 2 = 22 = 2 \times 11. $ | ^ ::: | Add the digits in blocks of two from right to left. The result must be divisible by 11. | $ 627 \to 6 + 27 = 33 = 3 \times 11 $ | ^ ::: | Subtract the last digit from the rest. The result must be divisible by 11. | $ 627 \to 62 − 7 = 55 = 5 \times 11. $| ^ ::: | Add 10 times the last digit to the rest. The result must be divisible by 11. (Works because 99 is divisible by 11). | $ 627 \to 62 + 70 = 132 \to 13 + 20 = 33 = 3 \times 11 $ | ^ ::: | If the number of digits is even, add the first and subtract the last digit from the rest. The result must be divisible by 11. | $ 918,082 \to \text{the number of digits is even} \\ 1808 + 9 − 2 = 1815 \to 81 + 1 − 5 = 77 = 7 \times 11 $ | ^ ::: | If the number of digits is odd, subtract the first and last digit from the rest. The result must be divisible by 11. | $ 14,179 \to \text{the number of digits is odd (5)} \\ 417 − 1 − 9 = 407 = 37 \times 11 $ | ^ 12 | It is divisible by 3 and by 4. | $ 324 \to \text{it is divisible by 3 and by 4.} $ | ^ ::: | Subtract the last digit from twice the rest. The result must be divisible by 12. | $ 324 \to 32 \times 2 − 4 = 60 = 5 \times 12. $ | ^ 13 | Form the alternating sum of blocks of three from right to left. The result must be divisible by 13. | $ 2,911,272 \to 272 − 911 + 2 = −637 $ | ^ ::: | Add 4 times the last digit to the rest. The result must be divisible by 13. (Works because 39 is divisible by 13). | $ 637 \to 63 + 7 × 4 = 91 \\ 9 + 1 × 4 = 13. $| ^ ::: | Subtract the last two digits from four times the rest. The result must be divisible by 13. | $ 923 \to 9 \times 4 − 23 = 13. $ | ^ ::: | Subtract 9 times the last digit from the rest. The result must be divisible by 13. (Works because 91 is divisible by 13). | $ 637 \to 63 - 7 \times 9 = 0. $ | ^ 14 | It is divisible by 2 and by 7. | $ 224 \to \text{it is divisible by 2 and by 7.} $ | ^ ::: | Add the last two digits to twice the rest. The result must be divisible by 14. | $ 364 \to 3 \times 2 + 64 = 70 \\ 1,764 \to 17 \times 2 + 64 = 98. $ | ^ 15 | It is divisible by 3 and by 5. | $ 390 \to \text{it is divisible by 3 and by 5.} $ | ^ 16 | If the thousands digit is even, the number formed by the last three digits must be divisible by 16. | $ 254,176 \to 176 $ | ^ ::: | If the thousands digit is odd, the number formed by the last three digits must be 8 times an odd number. | $ 3408 \to 408 = 8 \times 51 $ | ^ ::: | Add the last two digits to four times the rest. The result must be divisible by 16. | $ 176 \to 1 \times 4 + 76 = 80 \\ 1,168 \to 11 \times 4 + 68 = 112 $ | ^ ::: | The last four digits must be divisible by 16. | $ 157,648 \to 7,648 = 478 \times 16 $ | ^ ::: | The sum of the ones digit, double the tens digit, four times the hundreds digit, and eight times the thousands digit is divisible by 16. | $ 157,648 \to 7 \times 8 + 6 \times 4 + 4 \times 2 + 8 = 96 $ | ^ 17 | Subtract 5 times the last digit from the rest. (Works because 51 is divisible by 17.) | $ 221 \to 22 − 1 \times 5 = 17 $ | ^ ::: | Add 12 times the last digit to the rest. (Works because 119 is divisible by 17). | $ 221 \to 22 + 1 \times 12 = 22 + 12 = 34 = 17 \times 2 $ | ^ ::: | Subtract the last two digits from two times the rest. (Works because 102 is divisible by 17.) | $ 4,675 \to 46 \times 2 − 75 = 17 $ | ^ ::: | Add 2 times the last digit to 3 times the rest. Drop trailing zeroes. (Works because (10a + b) × 2 − 17a = 3a + 2b; since 17 is a prime and 2 is coprime with 17, 3a + 2b is divisible by 17 if and only if 10a + b is.) | $ 4,675 \to 467 \times 3 + 5 \times 2 = 1,411 \\ 238 \to 23 \times 3 + 8 \times 2 = 85 $ | ^ 18 | It is divisible by 2 and by 9.[6] | $ 342 \to \text{it is divisible by 2 and by 9.} $ | ^ 19 | Add twice the last digit to the rest. (Works because (10a + b) × 2 − 19a = a + 2b; since 19 is a prime and 2 is coprime with 19, a + 2b is divisible by 19 if and only if 10a + b is.) | $ 437\ to 43 + 7 \times 2 = 57. $ | ^ ::: | Add 4 times the last two digits to the rest. (Works because 399 is divisible by 19.) | $ 6,935 \to 69 + 35 \times 4 = 209 $ | ^ 20 | It is divisible by 10, and the tens digit is even. | $ 360 \to \text{is divisible by 10, and 6 is even.} $ | ^ ::: | The last two digits are 00, 20, 40, 60 or 80.[3] | $ 480 \to 80 $ | ^ ::: | It is divisible by 4 and 5. | $ 480\to \text{it is divisible by 4 and 5.} $ | ^ 21 | Subtracting twice the last digit from the rest gives a multiple of 21. (Works because (10a + b) × 2 − 21a = −a + 2b; the last number has the same remainder as 10a + b.) | $ 168 \to 16 − 8 \times 2 = 0 $ | ^ ::: | Suming 19 times the last digit to the rest gives a multiple of 21. (Works because 189 is divisible by 21). | $ 441 \to 44 + 1 \times 19 = 44 + 19 = 63 = 21 \times 3 $ | ^ ::: | It is divisible by 3 and by 7.[6] | $ 231 \to \text{it is divisible by 3 and by 7.} $ | ^ 22 | It is divisible by 2 and by 11.[6] | $ 352 \to \text{it is divisible by 2 and by 11} $ | ^ 23 | Add 7 times the last digit to the rest. (Works because 69 is divisible by 23.) | $ 3,128 \to 312 + 8 \to 7 = 368. 36 + 8 \times 7 = 92 $ | ^ ::: | Add 3 times the last two digits to the rest. (Works because 299 is divisible by 23.) | $ 1,725 \to 17 + 25 \times 3 = 92 $ | ^ ::: | Subtract 16 times the last digit from the rest. (Works because 161 is divisible by 23). | $ 1,012 \to 101 - 2 \times 16 = 101 - 32 = 69 = 23 \times 3 $ | ^ ::: | Subtract twice the last three digits from the rest. (Works because 2,001 is divisible by 23.) | $ 2,068,965 \to 2,068 − 965 \times 2 = 138 $ | ^ 24 | It is divisible by 3 and by 8.[6] | $ 552 \to \text{it is divisible by 3 and by 8.} $ | ^ 25 | The last two digits are 00, 25, 50 or 75. | $ 134,250 \to 50 \text{is divisible by 25.} $ | ^ 26 | It is divisible by 2 and by 13.[6] | $ 156 \to \text{it is divisible by 2 and by 13.} $ | ^ ::: | Subtracting 5 times the last digit from 2 times the rest of the number gives a multiple of 26. (Works because 52 is divisible by 26.) | $ 1,248 \to (124 \times 2) - (8 \times 5) = 208 = 26 \times 8 $ | ^ 27 | Sum the digits in blocks of three from right to left. (Works because 999 is divisible by 27.) | $ 2,644,272 \to 2 + 644 + 272 = 918 $ | ^ ::: | Subtract 8 times the last digit from the rest. (Works because 81 is divisible by 27.) | $ 621 \to 62 − 1 \times 8 = 54 $ | ^ ::: | Sum 19 times the last digit from the rest. (Works because 189 is divisible by 27). | $ 1,026 \to 102 + 6 \times 19 = 102 + 114 = 216 = 27 \times 8 $ | ^ ::: | Subtract the last two digits from 8 times the rest. (Works because 108 is divisible by 27.) | $ 6,507: 65 × 8 − 7 = 520 − 7 = 513 = 27 × 19 $ | ^ 28 | It is divisible by 4 and by 7.[6] | $ 140 \to \text{it is divisible by 4 and by 7.} $ | ^ 29 | Add three times the last digit to the rest. (Works because (10a + b) × 3 − 29a = a + 3b; the last number has the same remainder as 10a + b.) | $ 348\to 34 + 8 \times 3 = 58 $ | ^ ::: | Add 9 times the last two digits to the rest. (Works because 899 is divisible by 29.) | $ 5,510 \to 55 + 10 \times 9 = 145 = 5 \times 29 $ | ^ ::: | Subtract 26 times the last digit from the rest. (Works because 261 is divisible by 29). | $ 1,015 \to 101 - 5 \times 26 = 101 - 130 = -29 = 29 \times -1 $ | ^ ::: | Subtract twice the last three digits from the rest. (Works because 2,001 is divisible by 29.) | $ 2,086,956 \to 2,086 − 956 \times 2 = 174 $ | ^ 30 | It is divisible by 3 and by 10.[6] | $ 270 \to \text{it is divisible by 3 and by 10} $ | ^ ::: | It is divisible by 2, by 3 and by 5 | $ 270 \to \text{it is divisible by 2, by 3 and by 5} $ | ^ ::: | It is divisible by 2 and by 15 | $ 270 \to \text{it is divisible by 2 and by 15} $ | ^ ::: | It is divisible by 5 and by 6 | $ 270 \to \text{it is divisible by 5 and by 6} $ |