2.5.1Number Theory (Intermediate)

Divisibility rules — 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 (with proofs where possible)

3,167 words14 min readdifficulty · medium4 backlinks

Core Idea

Think of a number like a recipe: n=dk10k+dk110k1++d110+d0n = d_k \cdot 10^k + d_{k-1} \cdot 10^{k-1} + \ldots + d_1 \cdot 10 + d_0. Divisibility rules translate "Does this recipe divide evenly?" into "Do these ingredients (digits) satisfy a simpler check?"


Foundation: Place Value Representation

Any positive integer can be written as: n=dk10k+dk110k1++d110+d0n = d_k \cdot 10^k + d_{k-1} \cdot 10^{k-1} + \ldots + d_1 \cdot 10 + d_0

where did_i are the digits (0–9). For example, n=1234=1103+2102+310+4n = 1234 = 1 \cdot 10^3 + 2 \cdot 10^2 + 3 \cdot 10 + 4.

Key insight: If we want to test divisibility by mm, we ask whether n0(modm)n ≡ 0 \pmod{m}. We can reduce each power of 10 modulo mm and work with the digits alone.


The Rules & Proofs

Rule 1: Divisibility by 2

Why? n=dk10k++d110all multiples of 10, hence even+d0n = \underbrace{d_k \cdot 10^k + \ldots + d_1 \cdot 10}_{\text{all multiples of 10, hence even}} + d_0

Since 100(mod2)10 ≡ 0 \pmod{2}, every power of 10 is divisible by 2. So: nd0(mod2)n ≡ d_0 \pmod{2}

Example: n=1238n = 1238. Last digit is 8 (even) → divisible by 2. Check: 1238=2×6191238 = 2 \times 619. ✓


Rule 2: Divisibility by 3

Proof from first principles: n=dk10k+dk110k1++d110+d0n = d_k \cdot 10^k + d_{k-1} \cdot 10^{k-1} + \ldots + d_1 \cdot 10 + d_0

Observe that 101(mod3)10 ≡ 1 \pmod{3} (since 10=3×3+110 = 3 \times 3 + 1). Therefore: 10212=1(mod3),1031(mod3),etc.10^2 ≡ 1^2 = 1 \pmod{3}, \quad 10^3 ≡ 1 \pmod{3}, \quad \text{etc.}

So: ndk1+dk11++d11+d0(mod3)n ≡ d_k \cdot 1 + d_{k-1} \cdot 1 + \ldots + d_1 \cdot 1 + d_0 \pmod{3} ndk+dk1++d1+d0(mod3)n ≡ d_k + d_{k-1} + \ldots + d_1 + d_0 \pmod{3}

Why this step? We replaced every 10i10^i with 1 because they're all congruent to 1 mod 3.


Rule 3: Divisibility by 4

Proof: n=dk10k++d2102multiples of 100+d110+d0n = \underbrace{d_k \cdot 10^k + \ldots + d_2 \cdot 10^2}_{\text{multiples of 100}} + d_1 \cdot 10 + d_0

Since 100=4×25100 = 4 \times 25, we have 1000(mod4)100 ≡ 0 \pmod{4}, and so all terms with 10i10^i for i2i ≥ 2 vanish: nd110+d0(mod4)n ≡ d_1 \cdot 10 + d_0 \pmod{4}

Why this step? We isolated the last two digits because higher powers of 10 are all multiples of 100, which is divisible by 4.


Rule 4: Divisibility by 5

Proof: nd0(mod5)n ≡ d_0 \pmod{5} because 100(mod5)10 ≡ 0 \pmod{5}. All higher powers vanish.

Example: n=1235n = 1235. Last digit is 5 → divisible by 5. Check: 1235=5×2471235 = 5 \times 247. ✓


Rule 5: Divisibility by 6

Why? 6=2×36 = 2 \times 3 and gcd(2,3)=1\gcd(2,3) = 1. If n0(mod2)n ≡ 0 \pmod{2} and n0(mod3)n ≡ 0 \pmod{3}, then by the Chinese Remainder Theorem, n0(mod6)n ≡ 0 \pmod{6}.


Rule 6: Divisibility by 7

Proof sketch: Let n=10a+bn = 10a + b where bb is the last digit and aa is the remaining part.

We want to find a linear combination that eliminates the factor involving bb modulo 7. Note that 103(mod7)10 ≡ 3 \pmod{7}, so: n3a+b(mod7)n ≡ 3a + b \pmod{7}

We want to construct a new number akba - kb that preserves divisibility. If we choose k=2k = 2: a2ba2b(mod7)a - 2b ≡ a - 2b \pmod{7}

We need to verify: n0(mod7)iffa2b0(mod7)n ≡ 0 \pmod{7}iff a - 2b ≡ 0 \pmod{7}.

Why this step? From n=10a+bn = 10a + b: n0(mod7)    10a+b0(mod7)    3a+b0(mod7)n ≡ 0 \pmod{7} \iff 10a + b ≡ 0 \pmod{7} \iff 3a + b ≡ 0 \pmod{7}

Multiply both sides by 5(since 5×3=151(mod7)5 \times 3 = 15 ≡ 1 \pmod{7}, so 5 is the modular inverse of 3): 5(3a+b)0(mod7)    15a+5b0(mod7)    a+5b0(mod7)5(3a + b) ≡ 0 \pmod{7} \iff 15a + 5b ≡ 0 \pmod{7} \iff a + 5b ≡ 0 \pmod{7}

But 5b2b(mod7)5b ≡ -2b \pmod{7} (since 52(mod7)5 ≡ -2 \pmod{7}), so: a2b0(mod7)a - 2b ≡ 0 \pmod{7}

Another: n=1057n = 1057

  • a=105a = 105, b=7b = 7
  • a2b=10514=91a - 2b = 105 - 14 = 91
  • a=9a = 9, b=1b = 1: 92=79 - 2 = 7
  • So 10571057 is divisible by 7. Check: 1057=7×1511057 = 7 \times 151. ✓

Rule 7: Divisibility by 8

Proof: nd2102+d110+d0(mod8)n ≡ d_2 \cdot 10^2 + d_1 \cdot 10 + d_0 \pmod{8} because 1000=8×1250(mod8)1000 = 8 \times 125 ≡ 0 \pmod{8}.

Why this step? 10310^3 and higher powers are all divisible by 8.


Rule 8: Divisibility by 9

Proof: Identical to the divisibility by 3 proof. 101(mod9)    ndi(mod9)10 ≡ 1 \pmod{9} \implies n ≡ \sum d_i \pmod{9}


Rule 9: Divisibility by 10

Proof: nd0(mod10)n ≡ d_0 \pmod{10}, so n0(mod10)    d0=0n ≡ 0 \pmod{10} \iff d_0 = 0.

Example: n=1230n = 1230. Last digit is 0 → divisible by 10. ✓


Rule 10: Divisibility by 11

Proof: n=dk10k+dk110k1++d110+d0n = d_k \cdot 10^k + d_{k-1} \cdot 10^{k-1} + \ldots + d_1 \cdot 10 + d_0

Observe that 101(mod11)10 ≡ -1 \pmod{11}. Therefore: 1001,1011,1021,1031,10^0 ≡ 1, \quad 10^1 ≡ -1, \quad 10^2 ≡ 1, \quad 10^3 ≡ -1, \quad \ldots

So: ndk(1)k+dk1(1)k1+d1+d0(mod11)n ≡ d_k \cdot (-1)^k + d_{k-1} \cdot (-1)^{k-1} + \ldots - d_1 + d_0 \pmod{11}

Why this step? We replaced each power of 10 with (1)i(-1)^i, creating an alternating pattern.

For practical use, compute: (d0d1+d2d3+)(d_0 - d_1 + d_2 - d_3 + \ldots) or equivalently (sum of digits at odd positions) − (sum of digits at even positions).


Visual Summary


Common Mistakes

Why it's wrong: 6=2×36 = 2 \times 3. The number must be divisible by BOTH. Example: 15 is divisible by 3 but not by 2, so not by 6.

The fix: Check BOTH conditions. Even last digit AND sum divisible by 3.

Why it's wrong: The key is 101(mod11)10 ≡ -1 \pmod{11}, not 10110 ≡ 1. This creates an alternating pattern, not a plain sum.

The fix: Alternate signs: (d0d1+d2d3+)(d_0 - d_1 + d_2 - d_3 + \ldots). Pattern matters!

Why it's wrong: The algebraic proof specifically requires subtraction to preserve the modular relationship.

The fix: Remember: "7 is heaven, so SUBTRACT to get there." Always a2ba - 2b.


Active Recall

Recall Explain divisibility rules to a12-year-old

Imagine you have a big number, like your phone's pascode or your favorite cricket score. You want to know if you can split it evenly into groups (like dividing chocolates among friends) by certain numbers—2, 3, 5, etc.

Instead of doing long division every time, there are shortcuts!

  • Divisibility by 2: Just check the last digit. If it's even (0, 2, 4, 6, 8), you can divide by 2. Why? Because everything else in the number is already a multiple of 10, which is divisible by 2.

  • Divisibility by 3 or 9: Add up all the digits. If that sum can be divided by 3 (or 9), the whole number can! This works because of a cool pattern: 10, 100, 1000… all leave remainder of 1 when divided by 3 or 9.

  • Divisibility by 5: Last digit is 0 or 5? You're good! Just like money (₹5, ₹10).

  • Divisibility by 11: This one's fun! Alternate adding and subtracting the digits (start from the right). If you get 0 or a multiple of 11, the number is divisible by 11.

These rules save time and make you look like a math wizard!


Mnemonic

4, 8: Look at last 2 or 3 digits

  • 4: last 2 digits
  • 8: last 3 digits

3, 9: Sum all digits

  • Pattern: powers of 10 are ≡ 1

11: Alternating sum (because 101(mod11)10 ≡ -1 \pmod{11})

6: Must pass both 2 and 3

7: The tricky one—subtract twice the last digit

"2-5-10 look at the end, 4-8 need two or three friends, 3-9 sum to transcend, 11 alternates without end, 6 needs two rules to defend, 7's the one where you subtract and descend."


Connections Modular Arithmetic — divisibility rules are applications of congruence

  • Chinese Remainder Theorem — why divisibility by 6 = divisibility by 2 AND 3
  • Place Value System — foundation for understanding digit manipulation
  • GCD and LCM — composite divisors like 6, 10, 12rely on prime factorization
  • Casting Out Nines — digit sum techniques used for error checking
  • Fermat's Little Theorem — deeper number-theoretic patterns involving modular arithmetic

Summary Table

| Divisor | Rule | Key Modular Fact | |---------|---------------| | 2 | Last digit even | 100(mod2)10 ≡ 0 \pmod{2} | | 3 | Sum of digits divisible by 3 | 101(mod3)10 ≡ 1 \pmod{3} | | 4 | Last2 digits divisible by 4 | 1000(mod4)100 ≡ 0 \pmod{4} | | 5 | Last digit 0 or 5 | 100(mod5)10 ≡ 0 \pmod{5} | | 6 | Divisible by both 2 and 3 | gcd(2,3)=1\gcd(2,3)=1 | | 7 | a2ba - 2b divisible by 7 | 103(mod7)10 ≡ 3 \pmod{7} | | 8 | Last 3 digits divisible by 8 | 10000(mod8)1000 ≡ 0 \pmod{8} | | 9 | Sum of digits divisible by 9 | 101(mod9)10 ≡ 1 \pmod{9} | | 10 | Last digit is 0 | nd0(mod10)n ≡ d_0 \pmod{10} | | 11 | Alternating digit sum divisible by 11 | 101(mod11)10 ≡ -1 \pmod{11} |


#flashcards/maths

What is the divisibility rule for 2? :: A number is divisible by 2 if its last digit is even (0, 2, 4, 6, 8).

Why does the divisibility rule for 3 work?
Because 101(mod3)10 ≡ 1 \pmod{3}, so every power of 10 is also≡ 1 mod 3. This means ndigits(mod3)n ≡ \sum \text{digits} \pmod{3}.
What is the divisibility rule for 4?
A number is divisible by 4 if its last two digits form a number divisible by 4, because 1000(mod4)100 ≡ 0 \pmod{4}.
What is the divisibility rule for 6?
A number is divisible by 6 if it is divisible by BOTH 2 and 3 (since 6 = 2×3 and gcd(2,3)=1).
How do you test divisibility by 7?
Take the number without the last digit (aa), subtract twice the last digit (2b2b). If a2ba - 2b is divisible by 7, so is the original number.
Why does the rule for 7 use subtraction, not addition?
The algebraic proof requires a2ba - 2b to preserve the equivalence n0(mod7)n ≡ 0 \pmod{7}, derived from 103(mod7)10 ≡3 \pmod{7} and modular inverses.
What is the divisibility rule for 8?
A number is divisible by 8 if its last three digits form a number divisible by 8, because 10000(mod8)1000 ≡ 0 \pmod{8}.
What is the divisibility rule for 9?
A number is divisible by 9 if the sum of its digits is divisible by 9, because 101(mod9)10 ≡ 1 \pmod{9}.
What is the divisibility rule for 11?
A number is divisible by 11 if the alternating sum of its digits (starting from the right: d0d1+d2d3+d_0 - d_1 + d_2 - d_3 + \ldots) is divisible by 11.
Why does the rule for 11 involve alternating signs?
Because 101(mod11)10 ≡ -1 \pmod{11}, so powers of 10 alternate: 100110^0 ≡ 1, 101110^1 ≡ -1, 102110^2 ≡ 1, etc.
Is 1236 divisible by 6? How do you check?
Yes. Check divisibility by 2: last digit is 6 (even) ✓. Check divisibility by 3: digit sum = 1+2+3+6 = 12, divisible by 3 ✓. So divisible by 6.

Is 2728 divisible by 11? :: Yes. Alternating sum: 82+72=118 - 2 + 7 - 2 = 11, which is divisible by 11.

Common mistake: "Divisibility by 6 means divisible by 2 OR 3." Why is this wrong?
It must be divisible by BOTH 2 AND 3. Example: 15 is divisible by 3 but not by 2, so not by 6.

Concept Map

test n mod m

10 equiv 0 mod 2

10 equiv 1 mod 3

100 equiv 0 mod 4

10 equiv 0 mod 5

10 equiv -1 mod 11

each 10^i equiv 1

signs alternate

higher powers vanish

Place value n = sum of d_i times 10^i

Reduce 10^i modulo m

Rule 2: last digit even

Rule 3: digit sum div by 3

Rule 4: last two digits

Rule 5: last digit 0 or 5

Rule 11: alternating digit sum

Sum of digits check

Alternating sum check

Isolate last two digits

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, divisibility rules ek shortcut hai yeh check karne ke liye ki ek number kisi aur number se completely divide ho sakta hai ya nahi, bina actual division kiye. Imagine karo tumhare pas ek bada number hai jaise 1236, aur tumhe pata karna hai ki kya yeh 3 se divide hota hai. Long division karna time-consuming hai, paragar tum sirf digits ko add karo (1+2+3+6 = 12) aur dekho ki 12 divisible hai 3 se, toh answer mil gaya! This works kyunki mathematically 10, 100, 1000... sab 3 se divide karne par1 remainder dete hain, toh original number ka remainder sirf digit sum par depend karta hai.

Har divisor ka apna pattern hai. 2, 5, aur 10 ke liye sirf last digit check karo. 3 aur 9 ke liye sare digits add karo. 11 ke liye thoda different hai—alternating pattern mein add aur subtract karo (kyunki 10 ko 11 se divide karne par -1 remainder milta hai

Go deeper — visual, from zero

Test yourself — Number Theory (Intermediate)

Connections