‹ ›
Foundations · Numbers

Factors, multiples and primes

Divisibility rules, prime factorisation with a factor tree, and the two numbers every fraction question needs: the GCD and the LCM.

First, the rules

Primes are the atoms of numbers

Every whole number above 1 is a prime or a product of primes, in exactly one way. That one fact gives you divisibility, the GCD, the LCM — and later, every fraction you simplify.

★ Words
Example 1
Factor of 12: a number that divides it (1, 2, 3, 4, 6, 12). Multiple of 12: 12, 24, 36 … Prime: exactly two factors (2, 3, 5, 7, 11, 13 …). 1 is not prime.
★ Divisibility tests
Example 1
by 2: even · by 3: digit sum divisible by 3 · by 4: last two digits · by 5: ends in 0 or 5 · by 6: both 2 and 3 · by 8: last three digits · by 9: digit sum divisible by 9 · by 10: ends in 0
Testing for a prime
Example 1
Try the primes up to √n. 97: √97 ≈ 9.8, so test 2, 3, 5, 7 — none divide it, so 97 is prime.
★ Prime factorisation
Example 2
Factor tree: split until every leaf is prime. 360 = 2³ · 3² · 5.
★ GCD (HCF)
Example 2
Common primes, each with its lower power. gcd(360, 84) = 2² · 3 = 12.
★ LCM
Example 3
Every prime that appears, each with its higher power. lcm(360, 84) = 2³ · 3² · 5 · 7 = 2 520.
Check
Example 3
gcd × lcm = a × b — 12 × 2 520 = 30 240 = 360 × 84.

See it

The sieve and the tree

Slide n. On the grid its multiples light up and the primes are outlined; on the right its factor tree splits it down to primes.

Step by step

Worked examples

1

Divisible by what?

divisibility tests

Which of 2, 3, 4, 5, 6, 8, 9, 10 divide 4 716?

Ask yourself: Use the tests — no division needed.

Show the solution
  1. Even → 2 ✓. Digit sum 4 + 7 + 1 + 6 = 18 → divisible by 3 ✓ and by 9 ✓. Last two digits 16 → 4 ✓. Last three digits 716 = 8 × 89.5 → not 8 ✗.
  2. Ends in 6 → not 5 ✗, not 10 ✗. Divisible by 2 and 3 → 6 ✓.
  3. So 2, 3, 4, 6, 9 divide it; 5, 8, 10 do not.

Answer 2, 3, 4, 6, 9

2

Factor trees and the GCD

prime factorisation · gcd

Write 180 and 168 as products of primes, then find their greatest common divisor.

Ask yourself: Split each number in any way you like — the primes at the leaves are always the same.

Show the solution
  1. 180 = 18 × 10 = (2 · 3 · 3) · (2 · 5) = 2² · 3² · 5.
  2. 168 = 8 × 21 = (2 · 2 · 2) · (3 · 7) = 2³ · 3 · 7.
  3. Common primes with the lower power: 2² and 3¹: gcd = 4 · 3 = 12.

Answer gcd = 12

3

LCM in a real question

lcm

One bus leaves every 12 minutes, another every 18. They leave together at 9:00. When do they next leave together?

Ask yourself: "Together again" means a common multiple — and the first time means the least one.

Show the solution
  1. 12 = 2² · 3, 18 = 2 · 3². Higher powers: 2² · 3² = 36.
  2. So they coincide every 36 minutes: next at 9:36.
  3. Check with the gcd: gcd(12, 18) = 6 and 12 × 18 ÷ 6 = 36 ✓.

Answer 9:36 — every 36 minutes

Practice: primes, GCD and LCM

0 / 0

Prime factorisations, greatest common divisors, least common multiples, divisibility tests and prime checks. Your best score is kept in this browser only.

About this lesson

Factors, multiples and primes: divisibility rules for 2, 3, 4, 5, 6, 8, 9 and 10, prime numbers and the sieve, prime factorisation with a factor tree, and how to read the greatest common divisor and the least common multiple from the prime factors. A sieve and a factor tree you can control, worked examples and practice. Everything on this page runs in your browser; nothing you type is sent or stored. Spotted an error? Tell us.