Mathwords logoMathwords

Infinitude of Primes — Definition, Formula & Example

The infinitude of primes is the fact that the list of prime numbers never ends. No matter how large a prime you find, there is always a bigger one.

Euclid's Theorem: for every finite set of primes {p1,p2,…,pn}\{p_1, p_2, \ldots, p_n\}, there exists a prime qq with q∉{p1,…,pn}q \notin \{p_1, \ldots, p_n\}. Equivalently, the set of primes P\mathbb{P} is infinite. Because P⊆N\mathbb{P} \subseteq \mathbb{N}, it is countably infinite, with cardinality ℵ0\aleph_0.

Key Formula

N=p1p2⋯pn+1N = p_1 p_2 \cdots p_n + 1
Where:
  • p1,…,pnp_1, \ldots, p_n = Any finite list of distinct primes
  • NN = The constructed number. Every prime factor of N is missing from the list.

How It Works

The classic proof is by contradiction. Suppose p1,…,pnp_1, \ldots, p_n were all the primes, and form N=p1p2⋯pn+1N = p_1 p_2 \cdots p_n + 1. Dividing NN by any pip_i leaves remainder 1, so no listed prime divides NN. Since N>1N > 1, it has at least one prime factor. That prime cannot be on the list, so the list was incomplete.

Worked Example

Problem: Suppose someone claims the only primes are 2, 5, and 11. Use Euclid's construction to find a prime missing from this list.
Step 1: Multiply the listed primes together and add 1.
N=2×5×11+1=110+1=111N = 2 \times 5 \times 11 + 1 = 110 + 1 = 111
Step 2: Divide 111 by each listed prime. It leaves remainder 1 every time, so none of 2, 5, or 11 divides 111.
111=2×55+1,111=5×22+1,111=11×10+1111 = 2 \times 55 + 1, \quad 111 = 5 \times 22 + 1, \quad 111 = 11 \times 10 + 1
Step 3: Factor 111 into primes. Both factors are prime, and neither one is on the original list.
111=3×37111 = 3 \times 37
Answer: The primes 3 and 37 are both missing from the list {2, 5, 11}, so the claim is false.

Why It Matters

RSA encryption, which protects online payments, needs very large primes. This theorem guarantees that primes exist beyond any size you choose. The proof is also a classic first example of proof by contradiction in college discrete math and introduction-to-proof courses.

Common Mistakes

Mistake: Thinking the new prime from the construction must be larger than every prime on the list.
Correction: The proof only guarantees a prime that is not on the list. In the example above, the list {2, 5, 11} produces 3, which is smaller than both 5 and 11.

Related Terms

  • Euclid's Theorems — Groups this result with Euclid's other number theory results
  • Composite Number — The constructed number N can be composite, like 111
  • Twin Primes — Unsolved question of whether twin prime pairs are also infinite
  • Natural Numbers — The set in which the infinitely many primes live
  • Aleph Null — Measures the size of the infinite set of primes
  • Prime Number — The numbers whose list never ends