Divisibility Rules: Patterns in the Digits

Divisibility Rules: Patterns in the Digits
Divisibility Rules: Patterns in the Digits | Ideasthesia

The digits of a number leak information about its factors.

A number is divisible by 3 if its digits sum to a multiple of 3. Check 372: 3 + 7 + 2 = 12, and 12 is divisible by 3, so 372 is too. Check 475: 4 + 7 + 5 = 16, not divisible by 3, so neither is 475.

Divisibility rules let you test factors by examining digits.

That's the unlock. You don't need to divide 372 by 3 to know it's divisible. The digits tell you. These rules aren't tricks to memorize — they emerge from how our decimal system interacts with arithmetic. The patterns in the digits reflect the structure of the number.


Divisibility by 2

A number is divisible by 2 if its last digit is even (0, 2, 4, 6, 8).

Why? n = 10q + r where r is the last digit. 10q is always divisible by 2. So n is divisible by 2 iff r is.

1,246: last digit 6 (even) → divisible by 2 ✓ 1,247: last digit 7 (odd) → not divisible by 2 ✗


Divisibility by 5

A number is divisible by 5 if its last digit is 0 or 5.

Why? 10q is always divisible by 5. So n = 10q + r is divisible by 5 iff r ∈ {0, 5}.

285: last digit 5 → divisible by 5 ✓ 287: last digit 7 → not divisible by 5 ✗


Divisibility by 10

A number is divisible by 10 if its last digit is 0.

This combines the rules for 2 and 5 (since 10 = 2 × 5).


Divisibility by 4

A number is divisible by 4 if its last two digits form a number divisible by 4.

Why? n = 100q + (last two digits). 100 = 4 × 25, so 100q is always divisible by 4.

2,316: last two digits 16. 16 ÷ 4 = 4 ✓ → divisible by 4 2,314: last two digits 14. 14 ÷ 4 = 3.5 ✗ → not divisible by 4


Divisibility by 8

A number is divisible by 8 if its last three digits form a number divisible by 8.

Why? 1000 = 8 × 125, so the rest of the number contributes multiples of 8.

7,128: last three digits 128. 128 ÷ 8 = 16 ✓ → divisible by 8


Divisibility by 3

A number is divisible by 3 if the sum of its digits is divisible by 3.

Why? In decimal, 10 ≡ 1 (mod 3), 100 ≡ 1 (mod 3), etc.

So n = aₖ × 10ᵏ + ... + a₁ × 10 + a₀ ≡ aₖ + ... + a₁ + a₀ (mod 3).

The number and its digit sum have the same remainder when divided by 3.

5,721: 5 + 7 + 2 + 1 = 15. 15 ÷ 3 = 5 ✓ → divisible by 3 5,723: 5 + 7 + 2 + 3 = 17. 17 ÷ 3 = 5.67 ✗ → not divisible by 3


Divisibility by 9

A number is divisible by 9 if the sum of its digits is divisible by 9.

Same reasoning: 10 ≡ 1 (mod 9), so n ≡ digit sum (mod 9).

8,379: 8 + 3 + 7 + 9 = 27. 27 ÷ 9 = 3 ✓ → divisible by 9 8,378: 8 + 3 + 7 + 8 = 26. 26 ÷ 9 = 2.89 ✗ → not divisible by 9

Note: divisibility by 9 implies divisibility by 3 (since 3 | 9).


Divisibility by 6

A number is divisible by 6 if it's divisible by both 2 and 3.

Check: even last digit AND digit sum divisible by 3.

234: even (4), digit sum 9 (divisible by 3) → divisible by 6 ✓ 235: odd → not divisible by 6 ✗


Divisibility by 11

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

Alternating sum: add odd-position digits, subtract even-position digits (or vice versa).

Why? 10 ≡ -1 (mod 11), so 10² ≡ 1, 10³ ≡ -1, etc.

9,185: 9 - 1 + 8 - 5 = 11. 11 ÷ 11 = 1 ✓ → divisible by 11 9,184: 9 - 1 + 8 - 4 = 12. 12 ÷ 11 ≠ integer ✗ → not divisible by 11


Divisibility by 7 (and why it's harder)

No simple digit rule for 7.

One method: double the last digit, subtract from the rest, check if result is divisible by 7.

203: 20 - 2(3) = 14. 14 ÷ 7 = 2 ✓ → divisible by 7

Why harder? 10 ≡ 3 (mod 7), which doesn't create nice patterns like 1 or -1.


Summary Table

Divisor Rule
2 Last digit even
3 Digit sum divisible by 3
4 Last two digits divisible by 4
5 Last digit 0 or 5
6 Divisible by 2 and 3
8 Last three digits divisible by 8
9 Digit sum divisible by 9
10 Last digit 0
11 Alternating digit sum divisible by 11

Why These Patterns Exist

All divisibility rules come from modular arithmetic.

The key insight: how does 10 behave mod d?

  • 10 ≡ 0 (mod 2, 5, 10): only last digit matters
  • 10 ≡ 1 (mod 3, 9): digit sum equals number (mod 3 or 9)
  • 10 ≡ -1 (mod 11): alternating sum equals number (mod 11)
  • 10² ≡ 0 (mod 4): last two digits suffice
  • 10³ ≡ 0 (mod 8): last three digits suffice

The rules are theorems, not tricks.


Casting Out Nines

A classic error-checking technique.

To verify 347 × 28 = 9,716:

  • 347: digit sum 14 → 5 (mod 9)
  • 28: digit sum 10 → 1 (mod 9)
  • 5 × 1 = 5
  • 9,716: digit sum 23 → 5 (mod 9) ✓

If the digit sums don't multiply correctly mod 9, the answer is wrong. (Matching doesn't guarantee correctness, but mismatching proves error.)


The Core Insight

Divisibility rules extract structure from decimal representation.

Our number system is base 10, and 10's relationships with small primes create exploitable patterns. The rules are shortcuts — ways to read information about factors directly from digits without computing full division.

The patterns aren't coincidence. They're number theory hiding in plain sight.


Part 4 of the Number Theory series.

Previous: The Fundamental Theorem of Arithmetic: Unique Factorization Next: Greatest Common Divisor: What Numbers Share