## What are prime numbers?

Students start learning about prime numbers in year 5 as part of the KS2 curriculum. The topic is covered in more detail in KS3. We have broken down prime numbers into what you will learn in key stage 2 and what you learn in key stage 3. If you need further support, you can search for a Maths KS3 tutor.

### Key stage 2

A prime number is a special number that is greater than 1.

**It is a number that can only be divided by itself and 1**. For example, 5 is a prime number as it can only be divided by 1 and 5. The number 9 is not a prime number because it can also be divided by 3.The following are all the prime numbers below 20: 2, 3, 5, 7, 11, 13, 17 and 19. The number one is not a prime number because it has one factor and can only be divided by itself.

Prime numbers are infinite - you can keep creating them forever. However, the distance between each prime number becomes greater the further you go. For example, there are 8 prime numbers between 0 - 20 (see above). Between 100 - 120, there are 5 prime numbers (101, 103, 107, 109, 113) and between 200 - 220 there is only 1 (211).

### Key stage 3

A

**composite number**is a number that has more than two factors. For example, 9 is a composite number because there are three factors it can be divided by (1, 3 and 9). This can be expressed as a**product of prime numbers**.The only prime number that is even is 2. Every other prime number is odd (3, 5, 7, 11, 13, 17, 19 etc).

Understanding prime numbers helps us when learning about the

**Highest Common Factor**(HCF), the**Lowest Common Multiple**(LCM) and the**Product of Prime Factors**. Prime numbers are crucial to finding the highest common factor and the lowest common multiple of two of more numbers. We can also use prime numbers to break down a composite number into a product of its prime factors.We have already mentioned that a prime number has two factors it can be divided by - itself and one. This means a prime number always has a

**factor pair**. For example, the factors for the prime number 17 are 1 and 17. When we multiply 1 by 17, it equals the given number 17.Prime numbers feature significantly in cybersecurity - making online content secure, such as websites and databases. Data is encrypted with extremely large prime numbers that are multiplied together. It is very hard to break this product back down and find the factors, helping to keep information secure.

## How to find prime numbers

There are various ways to find prime numbers. We will try two methods for working out if a number is prime:

- The easiest way to check if a number is a prime number is to check how many factors it has. If the number has two factors (itself and 1), it is a prime number. For example, 11 is a prime number because it can only be divided by itself and 1. The number 9 is not a prime number because it can be divided by 3 as well as 9 and 1.
- We can write every prime number (except 2 and 3) with the equation
**6n + 1**or**6n - 1**. This lets us check if a number is prime by trying to express it as 6n + 1 or 6n -1. For example, using this equation shows that the first 4 prime numbers (after 2 and 3, which are exempt) are 5, 7, 11 and 13: - Check number 1 with the formula 6n - 1 - 6(1) - 1 =
**5** - Check number 1 with the formula 6n + 1 - 6(1) + 1 =
**7** - Check number 0 with the formula 6n - 1 - 6(2) - 1 =
**11** - Check number 0 with the formula 6n + 1 - 6(2) + 1 =
**13**

## Sieve of Eratosthenes

In 200 BC, a Greek mathematician called Eratosthenes created a simple method for finding prime numbers. The method is still used today.

The following guide will find all the prime numbers between 1 and 100. You can apply this method more widely, such as to find all prime numbers up to 1000:

- Make a chart of numbers from 1 - 100 (see image below).
- Leave 1 as it is - this is not a prime number or a composite number.
- Circle 2 and cross out all the multiples of this number, which are not prime (4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, etc).
- The next uncrossed number should be 3. Circle it and also cross out all the multiples of 3. Leave out the previously crossed-out numbers (9, 15, 21, 27, 33, etc).
- Continue this process until there are no numbers left that haven't been circled or crossed out, except number 1.

We can see from the chart that there are 25 prime numbers between 1 and 100: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89 and 97.

## Examples and quizzes

**1. Two prime numbers are added together. The total of these numbers is 38. What pair of prime numbers can create this product?**

A: 31 and 7

**2. Which are the two prime numbers – 41, 45, 47, 50?**

A: 41 and 47

**3. Write down any 3 prime numbers which multiply to make 429**

A: 11 x 3 x 13

### 1a

After 79, what is the next prime number?

### 1b

Which number is a prime number?

### 1c

Which numbers between 50 and 60 are prime numbers?

## Difference between prime and composite numbers

The term composite numbers is a term you hear often when studying prime numbers. The difference between a prime and a composite number has been explained below. No number can be both composite and prime:

- A prime number is greater than 1 and has exactly 2 factors (e.g. 3 is a prime number that can be divided by 3 and 1). A composite number has more than 2 factors e.g. 12 can be divided be 1, 2, 3, 4, 6 and 12.

Prime numbers | Composite numbers |

A number greater than 1 with two factors: itself and 1 | A number greater than 1 with three or more factors |

2 is the smallest prime number | 4 is the smallest composite number |

The first prime numbers are 2, 3, 5, 7 and 11 | The first composite numbers are 4, 6, 8, 9 and 10 |

## Smallest and largest prime number

The

**smallest prime number is 2**. This is also the only prime number that is even. It's worth remembering that 1 is unique because it is neither a prime number nor a composite number. It is a unique number and it's often referred to as a unit.It is unknown what the largest prime number is because numbers are infinite. The Greek mathematician Euclid was the first to prove that there is no largest prime number. This said scientists and mathematicians have continued to search for the largest prime number as part of the Great Internet Mersenne Prime Search (GIMPS).

To date, the

**largest known prime number is 2**, a number that has 24,862,048 digits. This was discovered in February 2023. The record continues to be updated and you can follow its progress from the Wikipedia article on the largest known prime number.^{82,589,933}− 1## Cyber security - Prime numbers in the real world

Prime numbers feature significantly in cyber security, which makes the information that we share over the internet safer. Whenever we pass information online - such as payment details, medical records, or even when we chat through apps like WhatsApp - this data needs to be encrypted to make it secure. To do this, software engineers create algorithms using 2 very large prime numbers.

It's worth stressing just how big these prime numbers are - some algorithms use prime numbers hundreds of digits in length! The algorithm multiplies these numbers together to create an even larger number. Only the creator of the algorithm knows what the original factors are (the original prime numbers).

The product of these large prime numbers is used to encrypt information. If someone tries to access the encrypted data, they first need to find the original factors. Because the prime numbers as so long, it could take years, even decades, of trial and error before they find a factor. It's called public-key cryptography and is very effective at keeping information secure.

## Related terms - Twin primes and co-prime numbers

### Twin Primes

A twin prime is a pair of prime numbers that have a gap of 2 between them. 5 and 7 are an example of twin prime numbers because this is a gap of 2 (7 - 5 = 2). Between a twin prime number is always one composite number: here the composite number between 5 and 7 is 6, which has four factors it can be divided by (1, 2, 3 and 6).

A Twin Prime can also be known as a

**prime twin**or**prime pair**. They become increasingly rare as the prime numbers increase in length. It's currently unknown whether there are infinite twin primes or if there is a largest pair.The first few twin prime pairs are 3 & 5, 5 & 7, 11 & 13, 17 & 19, 29 & 31, 41 & 43, 59 & 61, 71 & 73, 101 & 103.

The prime numbers 2 and 3 are not considered twin primes. As 2 is the only even prime, this is the only pair of prime numbers that have a difference of 1, not 2.

### Co-prime numbers

A

**co-prime number**is a pair of numbers that only have a common factor of 1 - the only shared number both numbers can be divided by is 1. Examples are listed below:- 5 and 9 are co-prime numbers. The factors for 5 are 1 and 5. The factors for 9 are 1, 3 and 9. The common factor for both numbers is 1.
- 6 and 11 are co-prime numbers. The factors for 6 are 1, 2, 3 and 6. The factors for 11 are 1 and 11. The common factor for both numbers is 1.

Co-prime numbers don't need to be prime numbers - the only condition is that the greatest common factor (GCF) needs to be 1. Both examples above have one number in the pair as a prime and the other as a composite. However, it's possible for both to be composite numbers.

## List of prime numbers

There are 25 prime numbers between 1 and 100. The frequency of prime numbers decreases the larger they get.

Below are three lists breaking down all the prime numbers up to 1000. Follow the link if you want to see the first 1000 prime numbers up to 7919.

### Prime numbers between 1 and 100

List of numbers | Prime numbers |

Between 1 and 10 | 2, 3, 5, 7 |

Between 11 and 20 | 11, 13, 17, 19 |

Between 21 and 30 | 23, 29 |

Between 31 and 40 | 31, 37 |

Between 41 and 50 | 41, 43, 47 |

Between 51 and 100 | 53, 59, 61, 67, 71, 73, 79, 83, 89, 97 |

### Prime numbers between 101 and 500

List of numbers | Prime numbers |

Between 101 and 200 | 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199 |

Between 201 and 300 | 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293 |

Between 301 and 400 | 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397 |

Between 401 and 500 | 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499 |

### Prime numbers between 501 and 1,000

List of numbers | Prime numbers |

Between 501 and 600 | 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599 |

Between 601 and 700 | 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691 |

Between 701 and 800 | 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797 |

Between 801 and 1000 | 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997 |

## History of Prime Numbers

Prime numbers have been studied for thousands of years. They were first referenced by Euclid in "Elements", which was written approximately 300 B.C. The book includes several examples of prime numbers and Euclid writes that there are infinite prime numbers. In 200 B.C. Eratosthenes created one of the earliest algorithms ever created called the "Sieve of Eratosthenes". This algorithm calculates prime numbers (see "How to find prime numbers").

Intellect and science were suppressed during the Dark Ages (5th - 14th centuries) and there was no further research into prime numbers. During the 1600s, mathematicians including Fermat, Euler and Gauss started to look for patterns with prime numbers. There were numerous theories during this time that revolutionised Maths - to this day, some have not yet been proven.

The Riemann Hypothesis is based on Bernhard Riemann's theory about prime numbers from 1859. It's considered the most important unsolved problem in pure Mathematics. Anyone who proves the theory will earn a $1 million prize from the Clay Mathematics Institute.

## Frequently asked questions

A prime number is a whole number that can only be divided by itself and 1 without a remainder/decimal place.

The first prime number is 2. This is also the only prime number that is even. Every other even number greater than 2 is composite because it has more than 2 factors. For example, the number 4 has three factors: 1, 2 and 4.

There are 25 prime numbers from 1 - 100: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89 and 97.

1 is not a prime number because it only has one factor - it can only be divided by itself. A prime number must have two factors.

Any number that isn't a prime number is called a composite. This means that the number has more than 2 factors: it can be divided more than 2 times. For example, 6 is a composite number because it has four factors: 1, 2, 3 and 6.

51 is not a prime number because it has four factors: it can be divided by 1, 3, 17 and itself.

A prime number must be a whole number and have a value greater than 1. A prime number can't be negative.

A twin prime number is a pair of prime numbers than have a gap of 2 between them. For example, 3 and 5 are twin prime numbers because there is a gap of 2 (5 - 3 = 2). This pair of prime numbers always have one composite number between them e.g. between 5 and 3, the composite number is 4. Another example of twin prime numbers is 5 and 7.

## Glossary

- factor - A whole number that divides another number evenly with no remainder/decimal place e.g. 3 is a factor of 12 because 12 / 3 = 4, which is a whole number. Other factors of 12 are 1, 2, 4, 6 and 12.
- product - The answer when two numbers are multiplied together e.g. the product of 5 and 7 is 35 (5 x 7 = 35).
- highest common factor - The largest factor that divides into all the given numbers. For example, if we are given the numbers 15 and 30, the highest common factor is 15, which will divide evenly into 15 and 30 with no remainder.
- lowest common factor - The lowest multiple that is shared by all the given numbers. For example, if we are given the numbers 10 and 22, the lowest common multiple is 110 (10 = 10, 20, 30, 40, 50, 60, 70, 80, 90, 10, 110 | 22 = 22, 44, 66, 88, 110). This is also known as the least common multiple.
- product of prime factors - The factors of 10 are 1, 2, 5 and 10. The prime factors are the factors that are also prime numbers. These numbers are 2 and 5. The number 10 can be expressed by multiplying its prime factors together: 10 = 2 × 5.
- factor pair - Two numbers multiplied together to make a selected whole number. For example, 3 and 4 are a factor pair of 12 because they can be multiplied together to make 12. A factor pair of 20 is 2 and 10 (2 x 10 = 20). A selected number can have more than several factor pairs.

*This post was updated on 01 Aug, 2023.*