Euclid's famous proof of infinite primes is not actually a proof by contradiction
Textbooks often say Euclid assumed a largest prime and derived an absurdity. He did nothing of the sort. His argument in the Elements works directly on any finite list of primes, and the logician Torkel Franzén called the contradiction version pointless. Mathematicians have since found at least 200 ways to prove the same fact.
Euclid's theorem states that the prime numbers never run out. His version, Book IX, Proposition 20 of the Elements, goes like this. Take any finite collection of primes and multiply them together, then add one. Call the result q. Either q is prime, in which case it is a new prime missing from the list, or it has some prime factor. That factor cannot be on the list, because every listed prime divides the product exactly, and a number dividing both the product and q would also divide their difference, which is 1. No prime divides 1, so a fresh prime exists either way. Euclid labelled his primes with letters A, B and Γ.
This is a proof by cases, a direct method. The common retelling adds the assumption that the list contains every prime, but as Franzén observed, that assumption plays no role in the argument, so framing it as a contradiction adds nothing.
Other giants took different routes. Leonhard Euler used the fact that every whole number factors uniquely into primes to link a product over primes to a sum over integers, an early form of the Euler product for the Riemann zeta function. Since the harmonic series grows without limit, the primes must be infinite; he even showed there are more primes than squares, and proved the stronger result that adding up the reciprocals of all primes also diverges.
Paul Erdős offered a counting proof: every positive integer splits uniquely into a square-free part and a perfect square, and bounding how many numbers up to N can be built this way forces the count of primes up to N to be at least half the base-2 logarithm of N, which grows without bound. In the 1950s Hillel Furstenberg produced an unexpected proof by contradiction using topology, defining open sets through arithmetic sequences.
Source: Euclid's theorem