Primes, factors, HCF and LCM
What this lesson covers
- Whole numbers greater than zero are either prime, composite, or the number 1. A prime number has exactly two distinct factors: 1 and the number itself. A composite number has more than two distinct factors. 1 is neither prime nor composite.
- The highest common factor (HCF) of two numbers is the greatest number that is a factor of both the numbers.
- The least common multiple (LCM) of two numbers is the smallest number that they are both factors of.
Is 1 a prime number?
- Almost everyone says yes.
- It is not. It is not composite either.
- And the reason is worth two minutes.
| Number | Its factors | Which |
|---|---|---|
| 13 | exactly 2 factors: 1, 13 | prime |
| 12 | 6 factors: 1, 2, 3, 4, 6, 12 | composite |
| 1 | only 1 factor: itself | neither |
A prime will not make a rectangle
- 12 dots go into a 3 by 4 rectangle.
- Or 2 by 6. Or 1 by 12.
- Three different ways, so 12 is composite.

Now try 13
- One row of 13. That is the only rectangle.
- Its only factors are 1 and 13.
- Exactly two. That is what prime means.

Try it: does it make a rectangle?
So why is 1 neither?
- 1 has only one factor: itself.
- Prime needs exactly two. Composite needs more than two.
- 1 has one. It fits neither box.
| Number | Its factors | Which |
|---|---|---|
| 13 | exactly 2 factors: 1, 13 | prime |
| 12 | 6 factors: 1, 2, 3, 4, 6, 12 | composite |
| 1 | only 1 factor: itself | neither |
Quick tests for factors
- You do not have to divide to find out.
- These rules answer most of it at a glance.
- Notice there is no rule here for 7.
| Divides by | If |
|---|---|
| 2 | ends in an even digit |
| 3 | digits add to a multiple of 3 |
| 4 | last two digits make a multiple of 4 |
| 5 | ends in 0 or 5 |
| 6 | passes the 2 test and the 3 test |
| 8 | last three digits make a multiple of 8 |
| 9 | digits add to a multiple of 9 |
| 10 | ends in 0 |
Is 342 divisible by 6?
- By 2? It ends in 2, so yes.
- By 3? 3 + 4 + 2 = 9, a multiple of 3. Yes.
- Both, so it is divisible by 6. 342 ÷ 6 = 57.
| Test | Working | Result |
|---|---|---|
| 2? | ends in 2 | yes |
| 3? | 3 + 4 + 2 = 9 | yes |
| 6? | both passed | yes |
The number that fools every rule
- 91 is odd, digits total 10, does not end in 0 or 5.
- Every rule you have says no.
- But 7 × 13 = 91. It is not prime.
| Test | Working | Divides? |
|---|---|---|
| 2? | 91 is odd | no |
| 3? | 9 + 1 = 10 | no |
| 5? | ends in 1 | no |
| 9? | 9 + 1 = 10 | no |
| 7? | 7 × 13 = 91 | YES |
The rules rule things out
- Passing every rule does not prove prime.
- To be sure, try each prime: 2, 3, 5, 7, 11...
- You can stop once the prime squared passes the number.
| For 91, try | Because |
|---|---|
| 2, 3, 5, 7 | 7 × 7 = 49, still under 91 |
| then 11 | 11 × 11 = 121, past 91; stop |
| Found | 7 divides it, so 91 is composite |
Maths blocks
Breaking a number into primes
- Split 84 into any factor pair. Say 4 and 21.
- Keep splitting until everything is prime.
- 84 = 2 × 2 × 3 × 7.

The starting split does not matter
- Start with 2 and 42 instead.
- Different tree, same primes at the bottom.
- Every number has exactly one set of primes.

Square numbers
- A square number is one you can make into a square.
- 5 rows of 5 is 25, which is 5².
- Squares go 1, 4, 9, 16, 25, all the way to 144.

Going backwards: the square root
- The square root asks: what was squared to get this?
- The sign is a radical: √.
- √144 = 12, because 12 × 12 = 144.
| Squaring | Rooting |
|---|---|
| 1² = 1 | √1 = 1 |
| 5² = 25 | √25 = 5 |
| 9² = 81 | √81 = 9 |
| 11² = 121 | √121 = 11 |
| 12² = 144 | √144 = 12 |
Highest common factor
- A factor of both numbers is a common factor.
- The biggest one is the highest common factor.
- And the primes show you it straight away.

HCF of 84 and 36
- 84 is 2 × 2 × 3 × 7. 36 is 2 × 2 × 3 × 3.
- What do they share? Two 2s and one 3.
- 2 × 2 × 3 = 12. That is the HCF.
| Number | As primes |
|---|---|
| 84 | 2 × 2 × 3 × 7 |
| 36 | 2 × 2 × 3 × 3 |
| Shared | 2 × 2 × 3 = 12 |
Try it: trees, then the HCF and LCM
Check it
- 84 ÷ 12 = 7. 36 ÷ 12 = 3.
- 7 and 3 share no factors at all.
- So nothing bigger than 12 could work.
| Working | Result |
|---|---|
| 84 ÷ 12 | 7 |
| 36 ÷ 12 | 3 |
| 7 and 3 share | nothing, so 12 is highest |
Lowest common multiple
- A number both go into is a common multiple.
- The smallest one is the lowest common multiple.
- Same two factor trees, read the other way.
| Number | As primes |
|---|---|
| 6 | 2 × 3 |
| 8 | 2 × 2 × 2 |
| Needs all | 2 × 2 × 2 × 3 = 24 |
LCM of 6 and 8
- 6 needs a 2 and a 3. 8 needs three 2s.
- Take everything either one needs: three 2s and a 3.
- 2 × 2 × 2 × 3 = 24.
| Counting up | Values |
|---|---|
| 6s | 6, 12, 18, 24, 30 |
| 8s | 8, 16, 24, 32, 40 |
| First shared | 24 |
Common mistakes
- 1 is a prime number.A prime has exactly two factors; 1 has only one factor, so it is neither prime nor composite.
- 91 is odd and fails the tests for 2, 3 and 5, so it is prime.Divisibility rules only rule numbers out; 91 = 7 × 13, so it is composite.
- The HCF of 84 and 36 is 2 × 2 × 3 × 3 × 7 = 252.HCF uses only the primes both share (two 2s and one 3), so it is 12; taking everything gives a common multiple instead.
- The LCM of 6 and 8 is 6 × 8 = 48.48 is a common multiple but not the lowest; take three 2s and one 3 to get 24.
Your turn: eight questions
- Work through all eight.
- For question 1, name which test settles it.
- For 3 and 4, break both numbers into primes first.
Is 51 prime? Show which test settles it.
What is √64?
Find the HCF of 24 and 60.
Find the LCM of 4 and 6.
Why is 1 not a prime number?
Which of these numbers is divisible by 6? Use the divisibility rules.
Write 90 as a product of primes.
Sausages come in packs of 6 and buns in packs of 9. What is the fewest sausages you can buy to have one bun for each?
Show answer
1. Not prime. 5 + 1 = 6, a multiple of 3, so 3 divides it: 51 = 3 × 17. 2. 8, because 8 × 8 = 64. 3. 24 = 2 × 2 × 2 × 3 and 60 = 2 × 2 × 3 × 5. Shared: 2 × 2 × 3 = 12. 4. 4 = 2 × 2 and 6 = 2 × 3, so the LCM is 2 × 2 × 3 = 12. Both answers are 12 by coincidence; the questions are unrelated. 5. It has only one factor, and a prime needs exactly two. Composite needs more than two, so 1 is neither. 6. 2,358. It is even and 2 + 3 + 5 + 8 = 18, a multiple of 3, so it passes the 2 and 3 tests: 2,358 ÷ 6 = 393. 7. 2 × 3 × 3 × 5. Split 90 into 9 × 10, then 9 = 3 × 3 and 10 = 2 × 5, and all of those are prime. 8. 18 sausages. That is the LCM: 6 = 2 × 3 and 9 = 3 × 3, so take 2 × 3 × 3 = 18 (3 packs of sausages, 2 of buns).
The answers
- 51 is not prime: digits total 6, so 3 divides it.
- √64 is 8. HCF of 24 and 60 is 12.
- LCM of 4 and 6 is also 12, a coincidence, not a rule.
| Answer | |
|---|---|
| 1 | 51 = 3 × 17, so not prime |
| 2 | √64 = 8 |
| 3 | HCF(24, 60) = 2 × 2 × 3 = 12 |
| 4 | LCM(4, 6) = 2 × 2 × 3 = 12 |
What to take away
- Prime means exactly two factors. 1 has one, so it is neither.
- Divisibility rules rule numbers out. They never prove prime.
- HCF is what two numbers share; LCM is everything either needs.
| Remember | |
|---|---|
| Prime | exactly two factors |
| 1 | is neither prime nor composite |
| Divisibility rules | rule numbers OUT; they never prove prime |
| HCF | the primes both numbers share |
| LCM | every prime either one needs |
Challenge
The five-digit number 7□3□6 is divisible by 72. Each □ stands for a single digit (the two boxes may be different). Find every possible number.
Hint
72 = 8 × 9, and 8 and 9 share no factor except 1. Use the test for 8 on the last three digits first, then the test for 9.
Answer
74,376 and 78,336
Step by step
- 72 = 8 × 9, and 8 and 9 have no common factor bigger than 1, so the number must pass both the test for 8 and the test for 9.
- Test for 8: the last three digits 3□6 must be a multiple of 8. Trying 306, 316, ..., 396, only 336 (8 × 42) and 376 (8 × 47) work. So the second box is 3 or 7.
- Test for 9: the digit sum 7 + □ + 3 + □ + 6 must be a multiple of 9.
- If the second box is 3, the digits so far add to 19, so the first box must be 8 to reach 27. That gives 78,336.
- If the second box is 7, the digits so far add to 23, so the first box must be 4 to reach 27. That gives 74,376.
Full working
- 72 = 8 × 9 = 2 × 2 × 2 × 3 × 3needs the 8 test and the 9 test
- 336 = 8 × 42, 376 = 8 × 47; 306, 316, 326, 346, 356, 366, 386, 396 failtest for 8
- 7 + a + 3 + 3 + 6 = 19 + a, so a = 8test for 9, second box 3
- 7 + a + 3 + 7 + 6 = 23 + a, so a = 4test for 9, second box 7
- 78,336 ÷ 72 = 1088 and 74,376 ÷ 72 = 1033check
- 74,376 and 78,336
Two different whole numbers have a highest common factor of 6 and a lowest common multiple of 180. Neither number is 6 and neither is 180. Find every possible pair.
Hint
Both numbers are 6 times something. After you divide both by 6, the two results can share no factor except 1, and they must multiply to 180 ÷ 6.
Answer
12 and 90, 18 and 60, 30 and 36
Step by step
- The HCF is 6, so both numbers are multiples of 6: call them 6 × a and 6 × b.
- a and b must share no factor except 1, or the HCF would be bigger than 6.
- Then the LCM is 6 × a × b, so a × b = 180 ÷ 6 = 30.
- Pairs that multiply to 30 and share no factor: 1 and 30, 2 and 15, 3 and 10, 5 and 6.
- 1 and 30 gives 6 and 180, which is not allowed. The other three give 12 and 90, 18 and 60, 30 and 36.
Full working
- 180 = 2 × 2 × 3 × 3 × 5 and 6 = 2 × 3prime factors
- numbers are 6 × a and 6 × b, with a × b = 30180 ÷ 6 = 30
- a, b share no factor: 1 and 30, 2 and 15, 3 and 10, 5 and 6factor pairs of 30
- 12 = 2 × 2 × 3, 90 = 2 × 3 × 3 × 5: HCF 6, LCM 180check one pair
- 18 and 60: HCF 6, LCM 180; 30 and 36: HCF 6, LCM 180check the others
- 12 and 90, 18 and 60, 30 and 36
Find the smallest whole number you can multiply 540 by to get a square number, and give the square root of that square number. Then find the smallest whole number you can multiply 540 by to get a cube number, and give the number that was cubed.
Hint
Break 540 into primes. In a square number every prime appears an even number of times. What must be true in a cube number?
Answer
Multiply by 15 to get 8100 = 90². Multiply by 50 to get 27,000 = 30³.
Step by step
- 540 = 2 × 2 × 3 × 3 × 3 × 5.
- A square number splits into two equal halves, so each prime must appear an even number of times. Here 3 appears three times and 5 once, so we need one more 3 and one more 5: multiply by 15.
- 540 × 15 = 8100 = 2 × 2 × 3 × 3 × 3 × 3 × 5 × 5, which is (2 × 3 × 3 × 5) × (2 × 3 × 3 × 5) = 90 × 90. So √8100 = 90.
- A cube number splits into three equal parts, so each prime must appear a multiple of 3 times. 2 appears twice and 5 once, so we need one more 2 and two more 5s: multiply by 2 × 5 × 5 = 50.
- 540 × 50 = 27,000 = (2 × 3 × 5) × (2 × 3 × 5) × (2 × 3 × 5) = 30 × 30 × 30.
Full working
- 540 = 2 × 2 × 3 × 3 × 3 × 5factor tree
- square: need even counts, add one 3 and one 53 × 5 = 15
- 540 × 15 = 8100 = 90 × 9090 = 2 × 3 × 3 × 5
- cube: need counts of 3, 6, ..., add one 2 and two 5s2 × 5 × 5 = 50
- 540 × 50 = 27,000 = 30 × 30 × 3030 = 2 × 3 × 5
- ×15 gives 90² = 8100; ×50 gives 30³ = 27,000
Practise this
Report a mistake
More in Number
Powers of 10 and expanded form6 min
Primes, factors, HCF and LCM7 min
Integers, and adding below zero6 min
Order of operations, rounding and remainders7 min
Fractions, decimals and percentages7 min
Multiplying and dividing fractions and decimals6 min
Percentages, fractions of amounts, and proportion6 min
Money, cash rounding and discounts6 minIs your child on track?
Take the free placement test