Maths●●●●●Difficulty 2 of 5

Why do prime numbers never run out?

A two-line argument written around 300 BC proves there is no biggest prime, and it still holds up today.

▶ Start the story

Prime numbers never run out because any list of primes you write down, however long, can be used to build a prime that isn't on it. Euclid showed this around 300 BC, in his book the Elements.

A torn, brownish papyrus fragment covered in Greek writing, with a small geometric diagram.
A papyrus fragment of Euclid's Elements found at Oxyrhynchus, Egypt: the book where the infinitude of primes was first proved.Photo: Euclid · Public domain

A prime is a whole number bigger than 1 that isn't the product of two smaller whole numbers, like 2, 3, 5 or 7. Here is Euclid's trick. Take your list of primes, multiply them all together, and add 1. Either that new number is prime, in which case you've found a prime missing from your list, or it isn't, in which case it can be divided by some prime. But that prime can't be on your list: every prime on the list divides the product exactly, so it would also have to divide the leftover 1, and no prime divides 1. Either way, your list was incomplete.

Euclid's recipe for a missing prime
  1. Step 1: Take any list of primes

    However long you like.

  2. Step 2: Multiply them all, add 1

    Call the result q.

  3. Step 3: If q is prime

    It's a prime not on your list.

  4. Step 4: If q isn't prime

    Its prime factors can't be on the list: they'd have to divide 1.

  5. Step 5: No list is ever complete

    So there are infinitely many primes.

Since every list falls short, there is no biggest prime. That hasn't stopped people from hunting for the biggest known one. The current record, found in October 2024 on a computer volunteered by a researcher named Luke Durant, has more than 41 million digits.

Quiz me

0/3

  1. 1.In Euclid's argument, why can't a prime on your list divide the product plus 1?
  2. 2.2 × 3 × 5 × 7 × 11 × 13 + 1 = 30,031 = 59 × 509. What does this example show?
  3. 3.Why don't record-breaking primes with millions of digits make encryption stronger?

Recap

Multiply your primes, add 1: whatever divides the result is a prime you didn't have.

Surprising fact · The largest known prime, found in 2024, has 41,024,320 digits.

Sources (3)

No source, no claim. Every fact in this lesson (14 claims) cites at least one of these.

  1. [1]Euclid's theorem · Wikipedia
  2. [2]Prime number · Wikipedia
  3. [3]Largest known prime number · Wikipedia
More lessons in ➗ Maths (3) See all maths lessons →

One more light on your map.

Get one lesson like this every day, about the things you love. Free, in two or five minutes.

Get the share card for this lesson ↗