Prime numbers
A prime number is a whole number greater than 1 that has exactly two factors: 1 and itself. The first few are 2, 3, 5, 7, 11 and 13. A number greater than 1 with more than two factors is a composite number: 4, 6, 8, 9, 10 and so on.
Is 1 a prime number?
No. The number 1 has only one factor, itself, so it does not fit the definition. It is neither prime nor composite. There is a good reason for leaving it out: every number can be broken into primes in exactly one way, and that would stop being true if 1 counted, since you could add as many 1s as you liked.
Facts worth knowing
- 2 is the only even prime. Every other even number has 2 as a factor.
- Apart from 2 and 5, every prime ends in 1, 3, 7 or 9. The reverse is not true: 21, 27 and 33 end in those digits but are not prime.
- There are 25 primes below 100 and 168 below 1000.
- There is no largest prime. Euclid proved more than two thousand years ago that the primes never end.
- Primes thin out as numbers grow, but they never stop, and no simple formula produces them all.
The sieve of Eratosthenes
This is the oldest way to list primes, and still a good one. Write the numbers 1 to 100 in a grid.
- Cross out 1.
- Circle 2, then cross out every other multiple of 2.
- Circle the next number not crossed out, 3, and cross out its other multiples.
- Do the same for 5 and then 7.
- Stop. Everything left is prime.
You can stop after 7 because the next prime is 11, and 11 × 11 is 121, which is beyond 100. Any composite number up to 100 must have a factor of 7 or less. In the grid below the primes are marked.
How to check whether a number is prime
Try dividing it by the primes in order, 2, 3, 5, 7, 11 and so on, and stop when the prime times itself is more than the number. If none divides, the number is prime.
Is 97 prime? It is odd, so not divisible by 2. Its digits add to 16, so not by 3. It does not end in 0 or 5. And 97 ÷ 7 is 13 remainder 6. The next prime is 11, and 11 × 11 = 121 is more than 97, so we can stop: 97 is prime.
Is 91 prime? It passes 2, 3 and 5, but 91 = 7 × 13. So 91 is composite, though it looks prime. Others that fool people are 51 (3 × 17), 57 (3 × 19), 87 (3 × 29) and 119 (7 × 17).
Prime numbers from 1 to 1000
All 168 of them, in rows by hundred.
| Range | Primes | Count |
|---|---|---|
| 1 to 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, 97 | 25 |
| 101 to 200 | 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199 | 21 |
| 201 to 300 | 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293 | 16 |
| 301 to 400 | 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397 | 16 |
| 401 to 500 | 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499 | 17 |
| 501 to 600 | 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599 | 14 |
| 601 to 700 | 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691 | 16 |
| 701 to 800 | 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797 | 14 |
| 801 to 900 | 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887 | 15 |
| 901 to 1000 | 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997 | 14 |
Why primes matter
Every whole number above 1 is either a prime or a product of primes, in one way only. That makes primes the building blocks of all numbers, as explained on the prime factorisation page. In school they are the key to HCF, LCM and simplifying fractions. Outside school, very large primes protect the messages your phone sends to your bank.
To test any number, use the factor finder. It says at once whether a number is prime.