What is a prime number?

Some numbers can be made by multiplying two smaller numbers: 6 is 2 × 3. Some cannot: the only way to make 7 is 1 × 7. Numbers like 7 are called prime numbers. Numbers like 6 are called composite numbers.

The rule

A prime number is a whole number bigger than 1 that can only be divided exactly by 1 and by itself.

The prime numbers up to 100

The coloured squares are the 25 primes up to 100. 1 is grey because it is not prime and not composite.
1 2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30
31 32 33 34 35 36 37 38 39 40
41 42 43 44 45 46 47 48 49 50
51 52 53 54 55 56 57 58 59 60
61 62 63 64 65 66 67 68 69 70
71 72 73 74 75 76 77 78 79 80
81 82 83 84 85 86 87 88 89 90
91 92 93 94 95 96 97 98 99 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

How to test if a number is prime

  1. Try dividing the number by 2, then 3, then 5, then 7, then the next primes in order. The divisibility rules make this quick.
  2. If one of them divides it exactly, the number is not prime. You can stop.
  3. Before each try, multiply the prime by itself. If the answer is bigger than your number, stop trying.
  4. If nothing divided it, the number is prime.

Worked examples

Is 37 prime?

2 ✗ 3 ✗ 5 ✗ 7 × 7 = 49, bigger than 37, so stop

Nothing divides 37, so yes, 37 is prime.

Is 51 prime?

2 ✗ 3 ✓ (5 + 1 = 6) 51 = 3 × 17

3 divides it, so no. 51 looks prime, but it is not.

Is 91 prime?

2 ✗ 3 ✗ 5 ✗ 7 ✓ 91 = 7 × 13

7 divides it, so no. 91 catches a lot of people out.

Prime and coprime

Prime is about one number. Coprime is about two numbers. Two numbers are coprime when the only number that divides both of them is 1.

8 and 9 are coprime, even though neither is prime. Two different primes, like 5 and 7, are always coprime, because nothing but 1 divides both.

Why you can stop early

Factors come in pairs that multiply to the number. For 36 they are 1 × 36, 2 × 18, 3 × 12, 4 × 9 and 6 × 6. In each pair, one number is 6 or less.

So if a number has a factor, it has a small one, no bigger than the number that times itself makes it. For 37, that means trying 2, 3 and 5 is enough.

You only need to try primes. If 4 divided the number, 2 would too, and you would already have stopped.

Where mistakes happen

Questions people ask

Is 1 a prime number?

No. A prime has exactly two factors, and 1 has only one.

Is 0 a prime number?

No. Every number divides 0, so it has far too many factors.

How many prime numbers are there?

They never run out. There are 25 up to 100, and they get rarer as numbers grow, but there is always another one.

What is a composite number?

A whole number bigger than 1 that is not prime. It can be made by multiplying smaller numbers, like 12 = 3 × 4.

What is the sieve of Eratosthenes?

An old way to find every prime up to 100. Cross out the multiples of 2 (but not 2), then of 3, 5 and 7. The numbers left, apart from 1, are the primes in the table above.

What are primes used for?

Every number bigger than 1 can be made by multiplying primes, and finding them is how you work out the highest common factor and the lowest common multiple.

See also