Divisibility rules, primes and prime factorisation

Divisibility rules from 2 to 11 and why they work, numbers with unknown digits, quick remainders, prime factorisation and the formula for the number of divisors.

  • Intermediate
  • 20 min
  • 15 questions
  • Lesson 26 of 53

In this lesson you will learn

  • Apply the rules for 2, 3, 4, 5, 6, 8, 9, 10, 11 and explain why the rules for 3, 9 and 11 work.
  • Find unknown digits from divisibility by a composite number.
  • Factorise a number into primes and test primality up to √n.
  • Count divisors with the formula (a + 1)(b + 1)….

Divisibility has not yet appeared as a separate item among the TR-YÖS items ÖSYM published, but by our estimate the first 10 TMT items form the «numbers and operations» block, and one such item may appear there. Divisibility also helps in Numerical Ability: in code tables the hidden rule is often a property such as «is the number divisible by 3?». Learn it once, use it in both tests.

The full theory is in Mathematics, in the lessons «Divisibility rules, prime and composite numbers» and «Greatest common divisor and least common multiple». Here we cover why the rules work, unknown-digit items and the number of divisors at exam speed.

Divisibility rules and why they work

10 is divisible by 2 and 5, 100 by 4 and 25, 1000 by 8 and 125. That is why divisibility by 2, 4, 5, 8 and 10 depends only on the last one, two or three digits: the rest of the number is divisible anyway. For 3, 9 and 11 all the digits take part — the table collects every rule.

DivisorRuleExample
2the last digit is even3574
3the digit sum is divisible by 37425: 18
4the number formed by the last two digits is divisible by 43716: 16
5the last digit is 0 or 57425
6divisible by both 2 and 33570
8the number formed by the last three digits is divisible by 85112: 112
9the digit sum is divisible by 97425: 18
10the last digit is 03570
11the alternating sum «+ − + −» from the right is divisible by 117425: 5 − 2 + 4 − 7 = 0
The divisibility rules. 3570 = 2 · 3 · 5 · 7 · 17 is divisible by both 6 and 10.

Why do the rules for 3 and 9 look at the digit sum? Because 10 = 9 + 1, 100 = 99 + 1, 1000 = 999 + 1. Split a number by place value and you get a big part divisible by 9 plus the sum of the digits. Look at 7425 in the picture. The same idea works for 11: 10 = 11 − 1, 100 = 99 + 1, 1000 = 1001 − 1, so the signs alternate.

7425 = 7 · 1000 + 4 · 100 + 2 · 10 + 5= (7 · 999 + 4 · 99 + 2 · 9)+ (7 + 4 + 2 + 5)divisible by 9digit sum = 1818 = 9 · 2⇒ 7425 is divisible by both 9 and 3
The violet part is always divisible by 9, so the orange part — the digit sum — decides.
abcd = (999a + 99b + 9c) + (a + b + c + d)

Where

abcd
a four-digit number with digits a, b, c, d

the first bracket is divisible by 9: the remainder of the number mod 9 (and mod 3) equals that of its digit sum

Example 1: check the rules

Problem

1) Which of 3, 4, 5, 9, 11 divide 7425?
2) Is 5112 divisible by 8 and by 9?
3) What are the remainders of 5678 when divided by 9, by 4 and by 5?

Show solutionHide solution

Solution

1) Digit sum 18 ⇒ 3 and 9 ✓. Last digit 5 ⇒ 5 ✓. The last two digits 25 are not divisible by 4 ⇒ 4 ✗. 5 − 2 + 4 − 7 = 0 ⇒ 11 ✓.
2) 112 = 8 · 14 ⇒ 8 ✓; 5 + 1 + 1 + 2 = 9 ⇒ 9 ✓.
3) By 9: digit sum 26 = 18 + 8 ⇒ remainder 8. By 4: last two digits 78 = 76 + 2 ⇒ 2. By 5: last digit 8 = 5 + 3 ⇒ 3.

Sign up free to keep reading

The rest of the lesson, the quiz and your notes open with an Educora account. Signing up takes a minute, and your progress is saved on all your devices.

Unknown digits

In items like «4a7b is divisible by 15», split the divisor into coprime factors: 15 = 3 · 5, 36 = 4 · 9, 45 = 5 · 9, 72 = 8 · 9, 12 = 3 · 4. Use the rule that fixes the last digit first (2, 4, 5, 8, 10), then the digit sum (3, 9). At each step remember that a and b are digits from 0 to 9, and the first digit cannot be 0.

Example 2: 4a7b divisible by 15

Problem

The four-digit number 4a7b is divisible by 15. How many such numbers are there?

Show solutionHide solution

Solution

1) 15 = 3 · 5. By 5: b = 0 or b = 5.
2) b = 0: 4 + a + 7 = 11 + a must be divisible by 3 ⇒ a = 1, 4, 7.
3) b = 5: 16 + a must be divisible by 3 ⇒ a = 2, 5, 8.
4) 6 numbers in all: 4170, 4470, 4770, 4275, 4575, 4875.

Example 3: 3a5b divisible by 36

Problem

The four-digit number 3a5b is divisible by 36 ⇒ a + b = ?

Show solutionHide solution

Solution

1) 36 = 4 · 9 (coprime).
2) By 4, 5b must be divisible by 4: 52 and 56 ⇒ b = 2 or 6.
3) By 9, 3 + a + 5 + b = 8 + a + b must be divisible by 9.
b = 2: 10 + a ⇒ a = 8 (3852). b = 6: 14 + a ⇒ a = 4 (3456).
4) In both cases a + b = 10. Check: 3852 = 36 · 107, 3456 = 36 · 96 ✓.

Primes and prime factorisation

A prime is a number with exactly two divisors: 1 and itself. 1 is not prime (it has one divisor), and 2 is the only even prime. The primes up to 50: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47. Every natural number greater than 1 is a product of primes, and this factorisation is unique (apart from the order).

360361066252323360 = 2³ · 3² · 5
Whatever pair you start with, the same primes end up in the leaves.

To test whether n is prime, it is enough to divide by the primes up to √n. Reason: if n = p · q, one of the factors is not larger than √n. For 221, √221 < 15: try 2, 3, 5, 7, 11, 13 — and 221 = 13 · 17.

Example 4: factorise and test

Problem

1) Factorise 504 into primes.
2) Is 221 prime?
3) Is 97 prime?

Show solutionHide solution

Solution

1) 504 = 8 · 63 = 2³ · 9 · 7 = 2³ · 3² · 7.
2) √221 < 15; it divides by 13: 221 = 13 · 17 ⇒ not prime.
3) √97 < 10; not divisible by 2, 3, 5, 7 ⇒ prime.

The number of divisors

72 = 2³ · 3². Every divisor of 72 has the form 2ⁱ · 3ʲ: the power of 2 is 0, 1, 2 or 3 (4 choices), the power of 3 is 0, 1 or 2 (3 choices). Each pair of choices gives one divisor, so there are 4 · 3 = 12 divisors. The table in the picture shows all twelve. That is why the formula adds 1 to each exponent: «0» is a choice too.

72 = 2³ · 3²4 · 3 = 122⁰2¹2²2³3⁰3¹3²12483612249183672column: power of 2 (4 choices)row: power of 3 (3 choices)
Each cell is one divisor: 72 has 12 positive divisors.
n = pᵃ · qᵇ · rᶜ ⇒ (a + 1) · (b + 1) · (c + 1)

Where

p, q, r
the different prime factors of n
a, b, c
their exponents

the number of positive divisors: add 1 to every exponent and multiply; integer divisors are twice as many

Example 5: count the divisors

Problem

1) How many positive divisors does 360 have?
2) And 100?
3) n = 2ᵃ · 3² has 15 positive divisors ⇒ a = ?
4) How many integer divisors does 12 have?

Show solutionHide solution

Solution

1) 2³ · 3² · 5 ⇒ 4 · 3 · 2 = 24.
2) 100 = 2² · 5² ⇒ 3 · 3 = 9.
3) (a + 1) · 3 = 15 ⇒ a = 4.
4) 12 = 2² · 3 ⇒ 3 · 2 = 6 positive, so with the negatives 12.
  1. Split the divisor

    Split a composite divisor into coprime factors: 36 = 4 · 9, 72 = 8 · 9.

  2. Start with the last digits

    The rules for 2, 4, 5, 8, 10 leave only a few choices for the last digit.

  3. Then the digit sum

    For each case write the rule for 3 or 9 and pick the digits from 0–9 that fit.

  4. Check what is asked

    The count of numbers? The sum of the a values? The largest a + b? List all cases and compute only what is asked.

Practice task (TR-YÖS style)

Problem

The four-digit number 6a2b is divisible by 45. What is the sum of all possible values of a?

A) 5 B) 6 C) 9 D) 10 E) 14

Show solutionHide solution

Solution

1) 45 = 5 · 9. By 5: b = 0 or 5.
2) b = 0: 6 + a + 2 + 0 = 8 + a = 9 ⇒ a = 1 (6120).
3) b = 5: 13 + a = 18 ⇒ a = 5 (6525).
4) The sum of the a values: 1 + 5 = 6. Answer: B) 6.
Check: 6120 = 45 · 136, 6525 = 45 · 145 ✓.

Remember

  • 2, 4, 5, 8, 10 — look at the last 1–3 digits; 3 and 9 — the digit sum; 11 — the alternating sum from the right.
  • The remainder mod 9 (and mod 3) equals that of the digit sum, because 10 = 9 + 1.
  • Split a composite divisor into coprime factors: 36 = 4 · 9, 24 = 3 · 8 (not 4 · 6).
  • 1 is not prime, 2 is the only even prime; test primality up to √n.
  • n = pᵃ · qᵇ ⇒ (a + 1)(b + 1) positive divisors; integer divisors are twice as many.
Spotted a mistake or something inaccurate in this lesson?

Check yourself

15 questions. Every correct answer earns XP.

Question 1 / 15

Question 1 / 15. Which number is divisible by 9?