• 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.

  1. Estimate √n by finding the two perfect squares around n.
  2. List the primes up to that estimate.
  3. 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

  1. Estimate the root 12² = 144, so √143 is a little less than 12.
  2. List primes up to it 2, 3, 5, 7 and 11.
  3. Test each prime 2, 3, 5 and 7 fail, but 11 × 13 = 143.
  4. 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.

— Rule to remember

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. 1. How many prime numbers are there between 1 and 50?

    1. 13
    2. 14
    3. 15
    4. 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. 2. Is 143 a prime number?

    1. Yes, it has no small factors
    2. No, it equals 11 × 13
    3. No, it is divisible by 7
    4. 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. 3. Which of these numbers is co-prime to 14?

    1. 21
    2. 28
    3. 35
    4. 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. 4. What is the smallest prime number greater than 90?

    1. 91
    2. 93
    3. 97
    4. 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. 5. What is the sum of all the prime numbers between 10 and 30?

    1. 112
    2. 101
    3. 119
    4. 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.

Privacy · Terms · Refunds · Delivery