Divisibility rules (for 2, 3, 5, 9, 10)

LVL: FREE

MODULE: Number Sense and Basic Intuition

[EXEC: MICRO_CORE]

โœ–๏ธ 1. Divisibility rules based on the last digits (2, 4, 5, 8, 10)

๐ŸŽฏ Last Digit Shortcuts

  • A number is divisible by 2 if its last digit is 0, 2, 4, 6, or 8.
  • A number is divisible by 5 if its last digit is 0 or 5.
  • A number is divisible by 10 if its last digit is 0.
  • A number is divisible by 4 if its last two digits form a number divisible by 4.
  • A number is divisible by 8 if its last three digits form a number divisible by 8.

Example: 3456 is divisible by 2 (ends in 6), by 4 (56 รท 4 = 14), and by 8 (456 รท 8 = 57).

๐Ÿ’ก Memory hook: Powers of 2 check the tail โ€” bigger power, longer tail!

[EXEC: DEEP_COMPUTE]

1. Divisibility rules based on the last digits (2, 4, 5, 8, 10)

Divisibility by Last Digits

A number is divisible by certain divisors if its last one or more digits satisfy specific conditions. This method exploits the structure of our base-10 number system, where powers of 10 share common factors with these divisors.

Intuition: Since 10=2ร—510 = 2 \times 5, higher powers of 10 are divisible by 2, 5, and 10. The remainder when dividing by these numbers depends only on the trailing digits.

Core Rules:

  • Divisible by 2: Last digit is 0, 2, 4, 6, or 8 (even)
  • Divisible by 5: Last digit is 0 or 5
  • Divisible by 10: Last digit is 0
  • Divisible by 4: Last two digits form a number divisible by 4
  • Divisible by 8: Last three digits form a number divisible by 8

Consequence: These rules allow instant divisibility checks without full division, since 10kโ‰ก0(mod2,5,10)10^k \equiv 0 \pmod{2, 5, 10} for kโ‰ฅ1k \geq 1.

Example: 3456 is divisible by 2 (last digit 6 is even), by 4 (56 รท 4 = 14), but not by 8 (456 รท 8 = 57 remainder 0).

TASK_1[0 / 3]
LVL_2
EXEC: ALGORITHM

Which of the following numbers is divisible by 4?

DEEP_COMPUTE
ULTRA
[EXEC: MICRO_CORE]

โœ–๏ธ 2. Divisibility rules based on the sum of digits (3, 9) and alternating sums (11)

โž• Digit Sum Magic

  • A number is divisible by 3 if the sum of its digits is divisible by 3.
  • A number is divisible by 9 if the sum of its digits is divisible by 9.
  • A number is divisible by 11 if the alternating sum (first digit minus second plus third minus fourth...) is divisible by 11.
  • You can repeat the digit sum process until you get a single digit.

Example: 5427 โ†’ 5+4+2+7 = 18 โ†’ 1+8 = 9, so 5427 is divisible by both 3 and 9. For 11: 5-4+2-7 = -4, not divisible by 11.

๐Ÿ’ก Memory hook: Add for 3 and 9, alternate for 11!

[EXEC: DEEP_COMPUTE]

2. Divisibility rules based on the sum of digits (3, 9) and alternating sums (11)

Divisibility by Digit Sums

A number is divisible by 3 or 9 if the sum of its digits is divisible by the same number. For 11, use the alternating sum (subtract and add digits alternately).

Intuition: In base 10, 10โ‰ก1(mod3)10 \equiv 1 \pmod{3} and 10โ‰ก1(mod9)10 \equiv 1 \pmod{9}, so each digit contributes its face value to the remainder. For 11, 10โ‰กโˆ’1(mod11)10 \equiv -1 \pmod{11}, creating alternating signs.

Core Rules:

  • Divisible by 3: Sum of all digits is divisible by 3
  • Divisible by 9: Sum of all digits is divisible by 9
  • Divisible by 11: Alternating sum (rightmost digit positive, then subtract next, add next, etc.) is divisible by 11
  • The digit sum rule can be applied repeatedly until a small number is reached

Consequence: These rules reduce large number checks to simple arithmetic on single digits.

Example: 2457 has digit sum 2+4+5+7=182+4+5+7=18, divisible by 9, so 2457 is divisible by 9. Alternating sum: 7โˆ’5+4โˆ’2=47-5+4-2=4, not divisible by 11.

TASK_1[0 / 3]
LVL_2
EXEC: ALGORITHM

Find the missing digit dd such that the four-digit number 52d452d4 is divisible by 9.

DEEP_COMPUTE
ULTRA
[EXEC: MICRO_CORE]

โœ–๏ธ 3. Factor-based reasoning and combining rules for composite divisors (e.g., 6, 15)

๐Ÿ”— Combo Rules

  • A number is divisible by 6 if it passes both the 2-test and the 3-test.
  • A number is divisible by 15 if it passes both the 3-test and the 5-test.
  • For any composite number, check divisibility by all its prime factors.
  • The factors must be coprime (share no common factors) for this shortcut to work perfectly.

Example: 120 is divisible by 6 because it ends in 0 (divisible by 2) and 1+2+0 = 3 (divisible by 3).

๐Ÿ’ก Memory hook: Split composites into prime pieces, check each piece!

[EXEC: DEEP_COMPUTE]

3. Factor-based reasoning and combining rules for composite divisors (e.g., 6, 15)

Composite Divisibility Rules

A number is divisible by a composite number if it is divisible by all prime factors (or coprime factor pairs) of that composite. This follows from the fundamental theorem of arithmetic.

Intuition: If n=abn = ab where gcdโก(a,b)=1\gcd(a,b)=1, then divisibility by nn requires simultaneous divisibility by both aa and bb. We combine simpler tests to check composite divisors.

Core Rules:

  • Divisible by 6: Must be divisible by both 2 and 3 (even number with digit sum divisible by 3)
  • Divisible by 15: Must be divisible by both 3 and 5 (digit sum divisible by 3, last digit 0 or 5)
  • Divisible by 12: Must be divisible by both 3 and 4
  • This method works only when factors are coprime; otherwise use LCM logic

Consequence: Composite divisibility reduces to checking multiple simpler rules simultaneously, avoiding complex division.

Example: 120 is divisible by 6 because it is even (divisible by 2) and 1+2+0=31+2+0=3 (divisible by 3).

TASK_1[0 / 3]
LVL_2
EXEC: ALGORITHM

Which of the following numbers is divisible by 6?

DEEP_COMPUTE
ULTRA
[EXEC: MICRO_CORE]

โœ–๏ธ 4. Basic intuition and proofs behind why divisibility rules work

๐Ÿง  Why It Works

  • Our number system uses base 10, so each digit position is a power of 10.
  • For divisibility by 2 or 5: since 10 = 2 ร— 5, all higher place values are automatically divisible.
  • For divisibility by 3 or 9: powers of 10 leave remainder 1 when divided by 3 or 9, so only digit sums matter.
  • For divisibility by 11: powers of 10 alternate between remainder 1 and -1 when divided by 11.

Example: 234 = 2ร—100 + 3ร—10 + 4ร—1. Since 100 โ‰ก 1 (mod 3) and 10 โ‰ก 1 (mod 3), we get 2+3+4 (mod 3).

๐Ÿ’ก Memory hook: Place values hide patterns โ€” divisibility rules reveal them!

[EXEC: DEEP_COMPUTE]

4. Basic intuition and proofs behind why divisibility rules work

Why Divisibility Rules Work

Divisibility rules are consequences of modular arithmetic applied to the decimal representation n=โˆ‘i=0kdiโ‹…10in = \sum_{i=0}^{k} d_i \cdot 10^i, where did_i are digits. The behavior of 10i(modm)10^i \pmod{m} determines which digits matter.

Intuition: Each digit contributes diโ‹…10id_i \cdot 10^i to the total. The remainder modulo mm depends on 10iโ€Šmodโ€Šm10^i \bmod m. When 10iโ‰ก0,1,10^i \equiv 0, 1, or โˆ’1(modm)-1 \pmod{m}, simple patterns emerge.

Core Principles:

  • For mโˆฃ10km \mid 10^k: Only the last kk digits matter (e.g., 4, 8, 5, 10)
  • For 10โ‰ก1(modm)10 \equiv 1 \pmod{m}: All digits contribute equally, so digit sum matters (e.g., 3, 9)
  • For 10โ‰กโˆ’1(modm)10 \equiv -1 \pmod{m}: Digits alternate in sign (e.g., 11)
  • Proofs use the fact that nโ‰กโˆ‘diโ‹…(10iโ€Šmodโ€Šm)(modm)n \equiv \sum d_i \cdot (10^i \bmod m) \pmod{m}

Consequence: All divisibility rules derive rigorously from properties of powers of 10 in modular arithmetic.

Example: For m=9m=9, since 10โ‰ก1(mod9)10 \equiv 1 \pmod{9}, we have 10iโ‰ก110^i \equiv 1, so nโ‰กโˆ‘di(mod9)n \equiv \sum d_i \pmod{9}.

TASK_1[0 / 3]
LVL_3
RSN: LOGIC

According to the theory, if a number mm divides 10k10^k, which digits of a large number nn determine its divisibility by mm?

DEEP_COMPUTE
ULTRA
[EXEC: MICRO_CORE]

โœ–๏ธ 5. Applications: Packaging optimization algorithms and load balancing in IT

๐Ÿ“ฆ Real-World Speed Hacks

  • Packaging: Check if 1248 items can be packed into boxes of 6 without opening a calculator (yes: even number, digit sum 15 divisible by 3).
  • Load balancing: Distribute 5427 tasks across 9 servers evenly (yes: digit sum 18 divisible by 9, so 603 tasks per server).
  • Batch processing: Quickly verify if data chunks are divisible by 10 for decimal alignment.
  • Inventory systems: Instantly check if stock quantities split evenly across warehouses.

Example: A warehouse has 3600 units. Divisible by 2, 3, 5, 9, 10 โ€” can split into 2, 3, 4, 5, 6, 9, 10, 12, 15, 18, 20... boxes.

๐Ÿ’ก Memory hook: Divisibility = instant yes/no without division!

[EXEC: DEEP_COMPUTE]

5. Applications: Packaging optimization algorithms and load balancing in IT

Practical Applications of Divisibility

Divisibility rules enable rapid feasibility checks in resource allocation problems, where items must be grouped evenly without remainder. These appear in logistics, computing, and manufacturing.

Intuition: When distributing nn items into groups of size kk, divisibility of nn by kk determines whether perfect partitioning is possible without waste or splitting.

Core Applications:

  • Packaging optimization: Checking if 1248 items fit exactly into boxes of 12 (test: divisible by 3 and 4)
  • Load balancing: Distributing tasks across 8 servers requires total task count divisible by 8
  • Batch processing: Verifying dataset sizes are multiples of batch size (e.g., 64, 128) before training
  • Inventory management: Ensuring stock quantities align with case pack sizes

Consequence: Quick mental divisibility checks prevent costly computational overhead or physical waste in large-scale operations.

Example: A warehouse has 4560 units. To pack in boxes of 15, check: last digit 0 (divisible by 5) and digit sum 4+5+6+0=154+5+6+0=15 (divisible by 3), so yes.

TASK_1[0 / 3]
LVL_3
EXEC: ALGORITHM

A warehouse needs to pack items into boxes of 1515. According to the divisibility rules for 1515, which of the following total item counts will fit exactly into the boxes without any items left over?

DEEP_COMPUTE
ULTRA

AWAITING_CONFIRMATION

CONFIRM KNOWLEDGE ACQUISITION TO UPDATE SYSTEM ANALYTICS.