There are infinitely many prime numbers. Below we also compute evidence up to a large bound.
Claim. There are infinitely many prime numbers.
Proof. Assume for contradiction that only finitely many primes exist. List them as p1 ≤ p2 ≤ … ≤ pk. Define N = p1p2⋯pk + 1.
For each index i, division of N by pi leaves remainder 1; equivalently, N is not divisible by any of p1, …, pk.
Since N > 1, it has a prime divisor q. Because none of p1, …, pk divides N, this prime q is different from every prime on the list, contradicting the assumption that the list contained all primes. Therefore the set of primes is infinite. ∎
The reasoning does not search for “the last prime”: it shows that every finite list of primes can be extended.
Verify some known primes/composites are classified correctly.
For each k, build N = 1 + ∏i≤k pᵢ and find a prime factor q ∤ ∏ pᵢ.
| k | ∏ pᵢ + 1 (N) | found factor q | q in first k? |
|---|
| x | π(x) | x/ln x | ratio |
|---|
For selected n, we confirm a prime exists in (n, 2n].
Random small prime sets S ⊂ {first 15 primes}; we verify (∏S + 1) mod p = 1 for all p∈S. This guarantees every prime factor of ∏S+1 is outside S.