- Foundation
- About 13 min
- 5 practice questions
Prime numbers: testing, listing and co-prime pairs
Test whether a number is prime using its square root, list primes in a range, and tell prime from co-prime.
If something looks wrong, please tell us.
Primes are the building blocks of all whole numbers, so being able to recognise them quickly is a core skill. You do not need to memorise a long list. A short test and a few facts about small primes are enough to settle any number you meet in an exam.
What is a prime number?
A prime number has exactly two factors: 1 and itself. The first primes are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47. There are 15 primes below 50. The number 1 is not prime and 2 is the only even prime. A number with more than two factors, such as 12, is composite.
The square-root test
To decide whether a number n is prime, divide it by the primes up to the square root of n. If none divides it exactly, n is prime. The reason is that if n = a × b, one of a and b is at most √n, so a factor smaller than √n must exist for every composite number.
- Estimate √n by finding the two perfect squares around n.
- List the primes up to that estimate.
- Test each prime; use the divisibility rules for 2, 3, 5, 11 and long division for 7 and 13.
Worked example 1: is 143 prime?
√143 is a little less than 12, since 12² = 144. The primes to test are 2, 3, 5, 7 and 11. 143 is odd and does not end in 0 or 5; its digit sum is 8, so 3 does not divide it; 7 × 20 = 140, leaving remainder 3, so 7 does not divide it; but 11 × 13 = 143. So 143 is composite, even though it looks like a prime.
The square-root test on 143
- Estimate the root 12² = 144, so √143 is a little less than 12.
- List primes up to it 2, 3, 5, 7 and 11.
- Test each prime 2, 3, 5 and 7 fail, but 11 × 13 = 143.
- Decide A prime divides it, so 143 is composite.
Worked example 2: is 101 prime?
√101 is a little more than 10, since 10² = 100. The primes to test are 2, 3, 5 and 7. 101 is odd, its digit sum is 2 (not a multiple of 3), it does not end in 0 or 5, and 7 × 14 = 98 leaves remainder 3. None divides, so 101 is prime.
To test whether n is prime, check divisibility by every prime up to the square root of n.
Listing primes in a range
To find the primes between 50 and 70, cross out numbers that are multiples of 2, 3, 5 or 7 (the primes up to 7 are enough, because 11² = 121 is bigger than 70). What remains is 53, 59, 61 and 67. A quick check of the odd numbers: 51 = 3 × 17, 55 = 5 × 11, 57 = 3 × 19, 63 = 7 × 9, 65 = 5 × 13 and 69 = 3 × 23 are all composite.
Co-prime numbers
Two numbers are co-prime when their only common factor is 1. They do not have to be prime themselves. For example 8 and 15 are co-prime because 8 = 2³ and 15 = 3 × 5 share no prime. A quick test is to find the HCF: if it is 1, the numbers are co-prime. The numbers 14 and 15 are co-prime, while 14 and 21 are not, because both are multiples of 7.
Co-prime or not?
-
Co-prime (HCF 1)
- 8 and 15: 2³ and 3 × 5 share no prime
- 14 and 15
- Need not be prime themselves
-
Not co-prime
- 14 and 21
- Both are multiples of 7
Two primes are always co-prime, and so are any two consecutive numbers. Primes that differ by 2, such as 11 and 13 or 17 and 19, are called twin primes.
Key takeaways
- A prime has exactly two factors; 1 is not prime and 2 is the only even prime.
- To test n, divide by primes up to √n.
- Co-prime means the HCF is 1; the numbers need not be prime.
- There are 15 primes below 50: learn them.
Check your understanding
-
1. How many prime numbers are there between 1 and 50?
- 13
- 14
- 15
- 16
Show answer
Answer: C. The primes are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, which is 15 numbers.
-
2. Is 143 a prime number?
- Yes, it has no small factors
- No, it equals 11 × 13
- No, it is divisible by 7
- No, it is divisible by 3
Show answer
Answer: B. 11 × 13 = 143, so 143 is composite. It is not divisible by 3 or 7 (digit sum 8; 7 × 20 = 140 leaves remainder 3).
-
3. Which of these numbers is co-prime to 14?
- 21
- 28
- 35
- 15
Show answer
Answer: D. HCF(15, 14) = 1. The others share a factor with 14: 21 and 35 share 7, and 28 is a multiple of 14.
-
4. What is the smallest prime number greater than 90?
- 91
- 93
- 97
- 99
Show answer
Answer: C. 91 = 7 × 13, 93 = 3 × 31, 95 = 5 × 19 and 99 = 9 × 11 are all composite. 97 has no prime factor up to 9, so it is prime.
-
5. What is the sum of all the prime numbers between 10 and 30?
- 112
- 101
- 119
- 129
Show answer
Answer: A. The primes are 11, 13, 17, 19, 23 and 29. Their sum is 11 + 13 + 17 + 19 + 23 + 29 = 112.
Sign in to keep track of the lessons you finish.