Explainer
Proving There Is No Largest Prime
Euclid's argument, every step, the trap step slowed.
Start with the question. Is there a biggest prime number? A prime is a whole number bigger than 1 that only divides evenly by 1 and itself. The list starts 2, 3, 5, 7, 11, and it keeps going. The question is whether it stops.
The method is to assume the list does stop, and then find a prime the list missed. If the list is complete, that new prime must already be on it. It is not, so the assumption was false. The shape of the argument is a contradiction, and the work is in building the number that breaks the list.
Suppose there are finitely many primes. Write them all out as p₁, p₂, up to pₙ, where pₙ is the largest. Every prime is in this list. Nothing is missing. Hold that assumption and do not let go of it until the end.
Multiply all the primes together and add 1. Call the result N. So N = (p₁ × p₂ × … × pₙ) + 1. This is the step where the argument turns. The product is chosen so that dividing N by any prime on the list leaves a remainder of 1. Each prime on the list fails to divide N.
Check the construction
from math import prod
primes = [2, 3, 5, 7, 11, 13]
N = prod(primes) + 1
print(N) # 30031
for p in primes:
print(p, N % p) # every remainder is 1This is the step almost everyone ruins. It is tempting to say N must be prime. It need not be. 30031 is 59 times 509, so it is composite. The symptom of falling in is writing 'N is prime, contradiction' and stopping there. Do not claim N is prime. Only claim that N has a prime factor, and that factor is the missed prime.
N is bigger than 1, so it has at least one prime factor. Call one of them q. Could q be on the list? If it were, q would divide the product and also divide N. Then q would divide their difference, which is 1. Nothing divides 1 except 1 itself, and q is prime, so that is impossible. So q is not on the list.
Key point
Every finite list of primes misses at least one prime, so there is no largest prime.
The mechanism
Multiply the supposed complete list and add 1. The result has a prime factor, and that factor cannot be on the list, because dividing by any listed prime leaves remainder 1.
Where it breaks
The argument never says N is prime. Only that N has a prime factor the list lacks. Keep those two claims separate and the proof holds.
The Kicker
The product of all known primes, plus one, always points to a prime you have not yet named.
The same idea works for any finite set of primes, whatever its size. It does not tell you which new prime appears, only that one exists. The approach stops working for sequences that are not built from products of primes. Adding 1 to a product only guarantees a missing factor when the product covers every prime you are testing against.
Choose
