Prime Numbers and Prime Factorisation
How to tell whether a whole number is prime, and how to write a number as a product of its prime factors in index notation.
Before you start: factors and multiples
A factor of a whole number is a whole number that divides it exactly, leaving no remainder. A multiple of a number is the result of multiplying it by 1, 2, 3, ...
Example: the factors of 36. , so the factors of 36 are 1, 2, 3, 4, 6, 9, 12, 18 and 36, and 36 is a multiple of each of them.
Prime Numbers and Composite Numbers
Count the factors of each whole number from 1 to 10.
| Number | Factors | How many factors |
|---|---|---|
| 1 | 1 | 1 |
| 2 | 1, 2 | 2 |
| 3 | 1, 3 | 2 |
| 4 | 1, 2, 4 | 3 |
| 5 | 1, 5 | 2 |
| 6 | 1, 2, 3, 6 | 4 |
| 7 | 1, 7 | 2 |
| 8 | 1, 2, 4, 8 | 4 |
| 9 | 1, 3, 9 | 3 |
| 10 | 1, 2, 5, 10 | 4 |
The numbers 2, 3, 5 and 7 have exactly two factors; 4, 6, 8, 9 and 10 have more than two; 1 has only one.
Prime number
A prime number is a whole number greater than 1 that has exactly two different factors, 1 and itself.
The prime numbers less than 50: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47.
Composite number
A composite number is a whole number greater than 1 that has more than two different factors.
Examples: 4, 6, 8, 9, 10, 12, 14, 15.
0 and 1 are neither prime nor composite. The number 1 has only one factor, itself.
2 is the only even prime number. Every even number greater than 2 has the factor 2, as well as 1 and itself.
Testing Whether a Number Is Prime
A whole number greater than 1 is composite if it has a factor other than 1 and itself. Only prime numbers need to be tried as divisors (the numbers we divide by): if 3 does not divide a number exactly, then cannot divide it either.
We can also stop early. Factors come in pairs, as in the recap, and the smaller factor of a pair, multiplied by itself, is never more than the number. So a composite number always has a factor other than 1 that, multiplied by itself, is not more than the number. Once prime × prime is greater than the number, no such factor is left to find.
The test for a prime number
To test a whole number greater than 1, divide it by the prime numbers 2, 3, 5, 7, 11, ... in turn, for as long as prime × prime is not greater than the number.
- If one of them divides it exactly, the number is composite.
- If none of them does, the number is prime.
Divisibility tests for 2, 3 and 5
| A whole number is divisible by | exactly when |
|---|---|
| 2 | its last digit is 0, 2, 4, 6 or 8 |
| 3 | the sum of its digits is divisible by 3 |
| 5 | its last digit is 0 or 5 |
For 7, 11, 13 and larger primes, divide and look at the remainder.
Example 1: A prime number
Is 61 prime or composite?
- Try 2: the last digit, 1, is odd, so 61 is not divisible by 2.
- Try 3: is not divisible by 3, so 61 is not divisible by 3.
- Try 5: the last digit is not 0 or 5, so 61 is not divisible by 5.
- Try 7: , so 61 is not divisible by 7.
- The next prime is 11, but is greater than 61, so we stop.
Answer: None of 2, 3, 5 and 7 divides 61 exactly, so 61 is a prime number.
Example 2: A composite number
Is 323 prime or composite?
is less than 323, but is greater, so the primes up to 17 may all be needed.
| Prime | Working | Divides 323 exactly? |
|---|---|---|
| 2 | the last digit, 3, is odd | No |
| 3 | , not divisible by 3 | No |
| 5 | the last digit is not 0 or 5 | No |
| 7 | No | |
| 11 | No | |
| 13 | No | |
| 17 | Yes |
Answer: , so 323 has factors other than 1 and itself. 323 is a composite number.
Prime Factorisation with a Factor Tree
A composite number can always be broken down into factors that are prime numbers, called its prime factors. For example, has the prime factors 2, 5 and 7.
Prime factorisation
Prime factorisation is the process of expressing a composite number as a product of its prime factors.
A factor tree does this by breaking the number into smaller factors until every factor is prime.
Example 3: A factor tree
Find the prime factorisation of 660 using a factor tree.
- Break 660 into any two factors other than 1 and 660: .
- 2 is prime, so circle it. 330 is composite, so break it down again: .
- Go on until every branch ends in a prime: and .
- Write 660 as the product of the circled primes, smallest first.
Answer:
A different first step gives the same answer. Starting with :
The circled primes are again 2, 2, 3, 5 and 11. However a number is broken down, its prime factors come out the same.
Prime Factorisation by Repeated Division
Repeated division
Divide the number by the smallest prime number that divides it exactly, and write the quotient underneath. Do the same to each quotient until the quotient is 1. The number is the product of all the divisors.
Example 4: Repeated division
Find the prime factorisation of 660 by repeated division.
- 660 is even: , and again .
- 165 is odd, but is divisible by 3: .
- 55 is not divisible by 3, but it ends in 5: .
- 11 is prime: . Stop, and read the divisors down the left-hand side.
Answer: , the same as from the factor tree.
Index Notation
When the same factor is repeated, index notation is a shorter way to write the product.
| Product | Index notation | How it is read |
|---|---|---|
| 5 to the power of 2 | ||
| 5 to the power of 3 | ||
| 5 to the power of 4 |
Base and index
In , 5 is the base and 3 is the index. The index tells us how many times the base is used as a factor: . A factor used only once has index 1, and the 1 is not written: .
Example 5: Index notation
(a) Write in index notation. (b) Find the value of .
(a) 3 is used as a factor 4 times and 7 is used twice: .
(b) and , so .
Answer: (a) (b) 504
A Product of Prime Factors in Index Notation
Write the prime factors in order, smallest first, and use an index for each one that is repeated. From Examples 3 and 4, .
Example 6: Prime factors in index notation
Express 2772 as a product of its prime factors in index notation.
- Any two factors will do to start a factor tree. Here we use . If you do not spot 12, start with , since 2772 is even: the primes at the ends come out the same.
- and .
- is divisible by 3, so 231 is divisible by 3: , and .
- Write 2772 as the product of the circled primes, in order. 2 and 3 are each used twice.
Answer:
Common Mistakes
- Calling 1 a prime number. 1 has only one factor, so it is not prime.
- Stopping a test too early. 119 is not divisible by 2, 3 or 5, but .
- Leaving a composite number in the answer. is not a prime factorisation, because .
- Multiplying the base by the index. , not .
Practice
Work each question on paper before you open its solution.
Question 1
State whether each number is prime or composite. Show your working. (a) 171 (b) 31 (c) 143
ShowHide solution
(a) is divisible by 3, so 171 is divisible by 3: . 171 is composite.
(b) 31 is odd, is not divisible by 3, and the last digit is not 0 or 5. The next prime is 7, but is greater than 31, so we stop. 31 is prime.
(c) 143 is odd, is not divisible by 3, the last digit is not 0 or 5, and . But is less than 143, so 11 must be tried: exactly. , so 143 is composite.
Question 2
Use a factor tree to find the prime factorisation of 54. Give your answer in index notation.
ShowHide solution
. Then and . All four ends are prime.
Answer:
Question 3
(a) Write in index notation. (b) Find the value of .
ShowHide solution
(a) 2 is used as a factor twice, 5 three times and 7 once. Answer:
(b) and , so . Answer: 1200
Question 4
Use repeated division to express 702 as a product of its prime factors in index notation.
ShowHide solution
702 is even: .
351 is odd, but is divisible by 3: , and .
13 is prime: .
Answer:
Question 5
Farid says, "Every prime number is odd." Mei Ling says, "Every odd number greater than 1 is prime." Give one number that shows each of them is wrong, with your reason.
ShowHide solution
Farid: 2 is prime, because its only factors are 1 and 2, and 2 is even.
Mei Ling: 9 is odd, but , so 9 has the factors 1, 3 and 9 and is composite. (15, 21 or 25 would also do.)
Question 6
A teacher has 91 chairs to set out in the school hall in equal rows. She wants more than one row, and more than one chair in each row. (a) Show how this can be done. (b) Explain why it cannot be done with 97 chairs.
ShowHide solution
(a) The number of rows must be a factor of 91 other than 1 and 91. 91 is odd, is not divisible by 3, and the last digit is not 0 or 5, but exactly. So . She can set out 7 rows of 13 chairs, or 13 rows of 7 chairs.
(b) 97 is odd, is not divisible by 3, the last digit is not 0 or 5, and . The next prime is 11, but is greater than 97, so 97 is prime. Its only factors are 1 and 97, so the only equal rows are 1 row of 97 chairs or 97 rows of 1 chair.
Question 7
A cuboid has a volume of . The length of each edge is a whole number of centimetres and is more than 1 cm. Find the lengths of its edges.
ShowHide solution
The volume is length × breadth × height, so express 385 as a product of prime factors.
385 ends in 5: . Then , and 11 is prime. So .
There are exactly three prime factors, and each edge, being more than 1 cm long, must take at least one of them. So each edge takes exactly one.
The edges are 5 cm, 7 cm and 11 cm long.
Key Points
- A whole number greater than 1 is prime if it has exactly two different factors, 1 and itself, and composite if it has more than two.
- 0 and 1 are neither prime nor composite. 2 is the only even prime number.
- To test whether a number is prime, divide it by the primes 2, 3, 5, 7, ... in turn, for as long as prime × prime is not greater than the number.
- A number is divisible by 2 when its last digit is even, by 3 when the sum of its digits is divisible by 3, and by 5 when its last digit is 0 or 5.
- Prime factorisation expresses a composite number as a product of its prime factors, by a factor tree or by repeated division.
- In , 5 is the base and 3 is the index.
- Write the primes in order, with an index for each repeated prime: .