# Divisibility rules for numbers 1–20

The rules given below transform a given number into a generally smaller number, while preserving divisibility by the divisor of interest. Therefore, unless otherwise noted, the resulting number should be evaluated for divisibility by the same divisor. In some cases the process can be iterated until the divisibility is obvious; for others (such as examining the last n digits) the result must be examined by other means.

For divisors with multiple rules, the rules are generally ordered first for those appropriate for numbers with many digits, then those useful for numbers with fewer digits.

Note: To test divisibility by any number that can be expressed as 2n or 5n, in which n is a positive integer, just examine the last n digits.

Note: To test divisibility by any number that can be expressed as the product of prime factors p 1 n p 2 m p 3 q {\displaystyle p{1}^{n}p{2}^{m}p{3}^{q}} p{1}^{n}p{2}^{m}p{3}^{q}, we can separately test for divisibility by each prime to its appropriate power. For example, testing divisibility by 24 (24 = 83 = 233) is equivalent to testing divisibility by 8 (23) and 3 simultaneously, thus we need only show divisibility by 8 and by 3 to prove divisibility by 24. Divisor Divisibility condition Examples

1 No special condition. Any integer is divisible by 1. 2 is divisible by 1.

2 The last digit is even (0, 2, 4, 6, or 8). 1294: 4 is even.

3 Sum the digits. If the result is divisible by 3, then the original number is divisible by 3. 405 → 4 + 0 + 5 = 9 and 636 → 6 + 3 + 6 = 15 which both are clearly divisible by 3. 16,499,205,854,376 → 1+6+4+9+9+2+0+5+8+5+4+3+7+6 sums to 69 → 6 + 9 = 15 → 1 + 5 = 6, 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. Using the example above: 16,499,205,854,376 has four of the digits 1, 4 and 7 and four of the digits 2, 5 and 8; ∴ Since 4 − 4 = 0 is a multiple of 3, the number 16,499,205,854,376 is divisible by 3.

4 Examine the last two digits. 40,832: 32 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: 3 is odd, and the last digit is 2. Twice the tens digit, plus the ones digit. 40832: 2 × 3 + 2 = 8, which is divisible by 4.

5 The last digit is 0 or 5. 495: the last digit is 5.

6 It is divisible by 2 and by 3. 1458: 1 + 4 + 5 + 8 = 18, so it is divisible by 3 and the last digit is even, hence the number is divisible by 6.

7 Form the alternating sum of blocks of three from right to left. 1,369,851: 851 − 369 + 1 = 483 = 7 × 69 Subtract 2 times the last digit from the rest. (Works because 21 is divisible by 7.) 483: 48 − (3 × 2) = 42 = 7 × 6. Or, add 5 times the last digit to the rest. (Works because 49 is divisible by 7.) 483: 48 + (3 × 5) = 63 = 7 × 9. Or, add 3 times the first digit to the next. (This works because 10a + b − 7a = 3a + b − last number has the same remainder) 483: 4×3 + 8 = 20 remainder 6, 6×3 + 3 = 21. Or, add the last two digits to twice the rest. (Works because 98 is divisible by 7.) 483,595: 95 + (2 × 4835) = 9765: 65 + (2 × 97) = 259: 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). Then sum the results. 483,595: (4 × (-2)) + (8 × (-3)) + (3 × (-1)) + (5 × 2) + (9 × 3) + (5 × 1) = 7.

8 If the hundreds digit is even, examine the number formed by the last two digits. 624: 24. If the hundreds digit is odd, examine the number obtained by the last two digits plus 4. 352: 52 + 4 = 56. Add the last digit to twice the rest. 56: (5 × 2) + 6 = 16. Examine the last three digits. 34,152: Examine divisibility of just 152: 19 × 8 Add four times the hundreds digit to twice the tens digit to the ones digit. 34,152: 4 × 1 + 5 × 2 + 2 = 16

9 Sum the digits. If the result is divisible by 9, then the original number is divisible by 9. 2880: 2 + 8 + 8 + 0 = 18: 1 + 8 = 9.

10 The last digit is 0. 130: the last digit is 0.

11 Form the alternating sum of the digits. 918,082: 9 − 1 + 8 − 0 + 8 − 2 = 22. Add the digits in blocks of two from right to left. 627: 6 + 27 = 33. Subtract the last digit from the rest. 627: 62 − 7 = 55. Add the last digit to the hundredth place (add 10 times the last digit to the rest). 627: 62 + 70 = 132. If the number of digits is even, add the first and subtract the last digit from the rest. 918,082: the number of digits is even (6) → 1808 + 9 − 2 = 1815: 81 + 1 − 5 = 77 = 7 × 11 If the number of digits is odd, subtract the first and last digit from the rest. 14,179: the number of digits is odd (5) → 417 − 1 − 9 = 407 = 37 × 11

12 It is divisible by 3 and by 4. 324: it is divisible by 3 and by 4. Subtract the last digit from twice the rest. 324: 32 × 2 − 4 = 60.

13 Form the alternating sum of blocks of three from right to left. 2,911,272: 2 - 911 + 272 = -637 Add 4 times the last digit to the rest. 637: 63 + 7 × 4 = 91, 9 + 1 × 4 = 13. Subtract the last two digits from four times the rest. 923: 9 × 4 - 23 = 13. Subtract 9 times the last digit from the rest. 637: 63 - 7 × 9 = 0.

14 It is divisible by 2 and by 7. 224: it is divisible by 2 and by 7. Add the last two digits to twice the rest. 364: 3 × 2 + 64 = 70. 1764: 17 × 2 + 64 = 98.

15 It is divisible by 3 and by 5. 390: it is divisible by 3 and by 5.

16 If the thousands digit is even, examine the number formed by the last three digits. 254,176: 176. If the thousands digit is odd, examine the number formed by the last three digits plus 8. 3408: 408 + 8 = 416. Add the last two digits to four times the rest. 176: 1 × 4 + 76 = 80.

1168: 11 × 4 + 68 = 112. Examine the last four digits. 157,648: 7,648 = 478 × 16.

17 Subtract 5 times the last digit from the rest. 221: 22 − 1 × 5 = 17. Subtract the last two digits from two times the rest. 4,675: 46 × 2 - 75 = 17.

18 It is divisible by 2 and by 9. 342: it is divisible by 2 and by 9.

19 Add twice the last digit to the rest. 437: 43 + 7 × 2 = 57. Add 4 times the last two digits to the rest. 6935: 69 + 35 × 4 = 209.

20 It is divisible by 10, and the tens digit is even. 360: is divisible by 10, and 6 is even. The number formed by the last two digits is divisible by 20. 480: 80 is divisible by 20. Note by Faizan Khan
4 years, 1 month ago

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

• Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
• Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
• Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$ ... $$ or $ ... $ to ensure proper formatting.
2 \times 3 $2 \times 3$
2^{34} $2^{34}$
a_{i-1} $a_{i-1}$
\frac{2}{3} $\frac{2}{3}$
\sqrt{2} $\sqrt{2}$
\sum_{i=1}^3 $\sum_{i=1}^3$
\sin \theta $\sin \theta$
\boxed{123} $\boxed{123}$

Sort by:

Are your fingers all right , how did you typed this all.. But this all are nice method..

- 2 years, 5 months ago

Yup, this is just Divisiblity Rules.

- 4 years, 1 month ago