Sub topic 4
Divisibility Rules for 2, 3, 4, 5, 6, 8, 9, 10, and 11
This chapter assumes you know what factors and multiples are, and that "n is divisible by d" means n divided by d is an integer with no remainder. You should also be comfortable with place value and with exponents such as 10^3. The goal is to test divisibility by inspecting digits, and to know why each test works so you do not misapply it.
The idea behind every rule
A number like 3,276 is a sum of digits times powers of 10: 3·1000 + 2·100 + 7·10 + 6. Each rule comes from how powers of 10 behave when divided by the number you are testing.
- Powers of 10 are made only of 2s and 5s. 10 = 2·5, 100 = 2²·5², and 1000 = 2³·5³. So every digit position from the hundreds up is already divisible by 4, and from the thousands up by 8. Only the last few digits matter for 2, 4, 5, 8, and 10.
- Every power of 10 is one more than a multiple of 9 (10 = 9 + 1, 100 = 99 + 1, and so on). Each digit therefore contributes "digit × 1" toward the remainder, which is why the digit sum matters for 3 and 9.
- Every power of 10 is alternately one more or one less than a multiple of 11 (10 = 11 − 1, 100 = 99 + 1, 1000 = 1001 − 1). Digits therefore alternate between adding and subtracting, which gives the alternating-sum test for 11.
The rules
| Divisor | Test | Example |
|---|---|---|
| 2 | Last digit is 0, 2, 4, 6, or 8 | 5,718 is divisible |
| 3 | Sum of digits is divisible by 3 | 4,512: 4+5+1+2 = 12, divisible |
| 4 | Number formed by last two digits is divisible by 4 | 7,316: 16 is divisible |
| 5 | Last digit is 0 or 5 | 2,385 is divisible |
| 6 | Divisible by both 2 and 3 | 4,512 is even and its digit sum is 12 |
| 8 | Number formed by last three digits is divisible by 8 | 91,512: 512 = 8·64, divisible |
| 9 | Sum of digits is divisible by 9 | 6,381: 6+3+8+1 = 18, divisible |
| 10 | Last digit is 0 | 4,730 is divisible |
| 11 | Alternating sum of digits is divisible by 11 (0 counts) | 918,082: see below |
Zero is divisible by every nonzero integer. For a negative integer, apply the rule to its absolute value, since −48 is divisible by exactly the same integers as 48.
Tests that look at the end of the number
For 2, 5, and 10, the last digit decides. For 4 and 8 you take the last two or three digits as a number and test that. If the number has fewer digits than that, test the whole number.
Take 91,512 and test 8. The last three digits give 512, and 512 ÷ 8 = 64, so 91,512 is divisible by 8. Take 3,276 instead. The last three digits give 276, and 276 = 8·34 + 4, so 3,276 is not divisible by 8. It is divisible by 4, though, because 76 = 4·19.
Tests that use the digit sum
For 3 and 9, add the digits. If the sum is large, add its digits again. A stronger fact holds here: a number and its digit sum leave the same remainder when divided by 3, and the same remainder when divided by 9. So 4,517 has digit sum 17. Since 17 leaves remainder 2 on division by 3 and remainder 8 on division by 9, so does 4,517.
The test for 11
Starting from the rightmost digit, alternate the signs: plus, minus, plus, minus. If the result is a multiple of 11 (including 0 or a negative multiple), the number is divisible by 11.
For 918,082, read the digits from the right: 2 − 8 + 0 − 8 + 1 − 9 = −22. Since −22 is a multiple of 11, the number is divisible. Check: 11 × 83,462 = 918,082. Starting from the left gives the same result up to a sign, so the direction does not matter for the yes-or-no answer.
Combining tests
Rule 6 works because 6 = 2·3, and 2 and 3 share no prime factor. You can build a test for a composite divisor by combining tests for factors that are coprime (share no factor greater than 1).
- 12 = 3·4, so test 3 and 4.
- 15 = 3·5, so test 3 and 5.
- 18 = 2·9, so test 2 and 9.
Combining only works for coprime pairs. A number divisible by both 2 and 4 is not necessarily divisible by 8, because 4 already contains the factor 2. The number 12 is the standard counterexample.
Verifying the rules in code
This program implements every rule from the table and compares it against Python's % operator for all integers from −5,000 to 5,000.
def passes_rule(n, d):
n = abs(n)
s = str(n)
digits = [int(c) for c in s]
digit_sum = sum(digits)
# Alternating sum starting from the rightmost digit
alt_sum = sum(x * (-1) ** i for i, x in enumerate(reversed(digits)))
if d == 2:
return digits[-1] % 2 == 0
if d == 3:
return digit_sum % 3 == 0
if d == 4:
return int(s[-2:]) % 4 == 0
if d == 5:
return digits[-1] in (0, 5)
if d == 6:
return passes_rule(n, 2) and passes_rule(n, 3)
if d == 8:
return int(s[-3:]) % 8 == 0
if d == 9:
return digit_sum % 9 == 0
if d == 10:
return digits[-1] == 0
if d == 11:
return alt_sum % 11 == 0
raise ValueError("no rule for this divisor")
divisors = [2, 3, 4, 5, 6, 8, 9, 10, 11]
ok = all(
passes_rule(n, d) == (n % d == 0)
for n in range(-5000, 5001)
for d in divisors
)
print(ok) # TrueCommon errors
- Testing 4 or 8 with too few digits. The last digit alone says nothing about 4. The number 14 is not divisible by 4, but 12 is, and both end in an even digit.
- Treating "divisible by 2 and 4" as "divisible by 8". Combine only coprime factors.
- Using the digit sum for 4, 5, or 11. The digit sum only works for 3 and 9.
- Rejecting a number because the alternating sum is 0 or negative. For 11, an alternating sum of 0 means the number is divisible. A negative multiple of 11 also counts.
- Forgetting that the rules need a whole number. They apply to integers. A decimal such as 12.6 is not divisible by anything in the sense used here.
- Ignoring zero and negatives. If a problem lets n be 0 or negative, 0 is divisible by every nonzero integer, and the rules apply to the absolute value.
Applying the rules on the GRE
Divisibility rules shine in two situations: filling in a missing digit, and settling a remainder or a comparison without doing long division.
Missing digit. The integer 5A28, where A is a single digit, is divisible by 3. The digit sum is 15 + A, which must be a multiple of 3. So A is 0, 3, 6, or 9. If the problem also says the number is divisible by 9, then 15 + A must be a multiple of 9, so A = 3 (18). The value 15 + A = 27 would need A = 12, which is not a digit.
Missing digit with 11. Suppose 72A5 is divisible by 11. From the right, the alternating sum is 5 − A + 2 − 7 = −A. For −A to be a multiple of 11 with A a single digit, A = 0. Check: 7,205 = 11 × 655.
Quantitative comparison. A three-digit integer n has digits that sum to 12. Quantity A is the remainder when n is divided by 3. Quantity B is 1. Since n and its digit sum 12 leave the same remainder on division by 3, and 12 is a multiple of 3, the remainder is 0. Quantity B is greater.
Exercises
Exercise
Is 53,784 divisible by 8? Is it divisible by 9?
Show answer
The last three digits are 784, and 784 = 8 × 98, so 53,784 is divisible by 8. The digit sum is 5 + 3 + 7 + 8 + 4 = 27, which is a multiple of 9, so it is also divisible by 9.
Exercise
The integer 3,4B6 is divisible by 4, where B is a single digit. Which values of B are possible?
Show answer
The last two digits form the number B6, and only that matters for 4. Test B6 for each digit: 06, 16, 26, 36, 46, 56, 66, 76, 86, 96. Those divisible by 4 are 16, 36, 56, 76, and 96. So B is 1, 3, 5, 7, or 9.
Exercise
A number is divisible by both 4 and 6. Must it be divisible by 24? Explain.
Show answer
No. The number 12 is divisible by 4 and by 6 but not by 24. The factors 4 and 6 share the factor 2, so they are not coprime, and the combined-test shortcut does not apply. A number divisible by 4 and 6 must be divisible by 12.
Exercise
Use the test for 11 to decide whether 2,816 is divisible by 11.
Show answer
From the right, 6 − 1 + 8 − 2 = 11, which is a multiple of 11. So 2,816 is divisible by 11. Check: 11 × 256 = 2,816.