# Euclid's proof of infinitude of primes.

http://en.wikipedia.org/wiki/Euclid's_theorem

I just read Euclid's proof for the existence of infinitely many primes (I have never used his proof earlier to prove this). It seems to me that he assumes it exist a finite number and he constructs the number $x=p_1 \cdot... \cdot p_n + 1$, then he says that $x$ is either prime or not, if it is we are done, if not it must exist a prime that divides it, and so on...(see link). However this proof makes no sense, it relies on the fact that if $x$ is not prime then it exist a prime that divides it which is exacly the (weak) fundamental theorem of arithmetics, however this theorem immediately implies that it exist infinite number of primes, because if it didnt then any number $n > p_1 \cdot... \cdot p_n$ cant have a prime factorization.

What am I missing here? To me it seems as Euclid's proof is just stupid.

• Not that anyone here cares that you think the proof is stupid, but you didn't give any reason why you think it is. – David Peterson Mar 6 '15 at 16:07
• Why do you think that the result that every integer $>1$ has a factorization into primes implies that there are infinitely many primes? – Gone Mar 6 '15 at 16:09
• I find it rather far reaching to state that a proof by not less than Euclids is stupid. It doesn't really use the Fundamental theorem of arithmetic but rather a more basic, "innocent", argument: a natural number bigger than one is either a prime or not a prime...and etc. I find it very compelling...and clear and correct, of course. – Timbuc Mar 6 '15 at 16:12
• BTW, when you have a proof that relies as a starting point on a theorem that immediately and obvious implies the statement you are proving, you can call that proof "vacuous" rather than "stupid", and avoid all the hassle about "how can you call a proof by this great mathematician stupid." – Mark Fischler Mar 6 '15 at 16:19
• And btw, you'll do much better in mathematics and any intellectual endeavor if before trashing a result (or analysis or thesis or opinion) that is well established you thoroughly understand it. – Simon S Jul 21 '15 at 22:03

The statement

For any $n$, there is a prime $p$ dividing $n$.

does not immediately imply that there are infinitely many primes. Even if we had only finitely many primes $p_1,\dots,p_n$, there are still infinitely many possible products of the form $p_1^{a_1}\dots p_n^{a_n}$, where the $a_i$ are indices, possibly equal to $0$.

I think the mistake you are making is that you're wrongly supposing that each prime can only occur once in the factorization of some number $n$, and that is why you think that it is impossible to factorize any number $n>p_1\dots p_n$ if $p_1,\dots,p_n$ are the only primes available to you. But that's false - the number:

$$p_1^{1000}\dots p_n^{1000}$$

is certainly greater than $p_1\dots p_n$ but can be factorized using only the primes $p_1,\dots p_n$.

The weak fundamental theorem of arithmetic does not imply an infinite set of primes.

For example, consider $$m = p_1^2 p_2 p_3 \cdots p_n$$ $m$ is greater than the "$n$" you give (by a factor of $p_1$), yet $m$ has a prime factorization.

It is also the case that infinite primes does not imply unique factorization; a good example of that is the ring of complex numbers of the from $a+ib\sqrt{5}$ where $a,b\in \Bbb{Z}$. This has infinite primes but not unique factorization.

I cannot think of an example that has an infinite number of elements and a total ordering, does have unique factorization, yet does not have an infinite set of primes. But if this can't exist, the proof is probably at least as complex as the Euclid proof that primes are infinite in $\Bbb{N}$.

To better understand Euclid's proof it helps to look at slightly more general number systems which actually do have finitely many primes. For example, let's consider the set $Z$ of all fractions whose denominator in lowest terms is coprime to $\,2\,$ and $\,3.\,$ It is easy to see that these numbers are closed under addition and multiplication because we can always choose the product of denominators as a least common denominator, since numbers coprime to $\,2,3\,$ are closed under multiplication.

In $Z$ any integer-prime $\,p\neq 2,3\,$ is a unit (invertible) since, by definition, $\,1/p\in Z,\,$ having denominator coprime to $\,2,3.\,$ Generally, since units divide everything, they play no useful role in factorizations, so we ignore them. Thus, just like in $\,\Bbb Z,\,$ where we ignore the units $\pm 1$ in factorizations, in $Z$ we can ignore all integer-primes $\,p\ne 2,3\,$ in any factorizations. So every nonzero element of $Z$ has a factorization of the form $\, 2^j 3^k,\,$ unique up to order and unit factors.

Now lets try applying Euclid's proof. Starting with the prime $\,2\,$ we add $1$ and obtain the prime $\,3$. Next we form $\,2\cdot 3+1 = 7\,$ and look for a prime factor. But this fails, because $\,7\,$ is a unit in $Z$ hence it has no prime factors. The same occurs if we add $1$ to any nonunit $\,2^j 3^k\,$ with $\,j,k\ge 1\,$ since it will be coprime to $\,2,3\,$ so it will have no prime factors in $Z$.

Notice also that the same proof as for integers shows that every nonunit in $Z$ has a factorization into primes - simply take its integer factorization and ignore the integer-primes $\neq 2,3.\,$ But this proof does not imply that there are infinitely many primes in $Z.\,$ Indeed, one easily verifies that the only primes in $Z$ are $\,2,3\,$ (up to unit factors).

Euclid's proof fails in $Z$ because the numbers generated can be units, hence have no new prime factors. For number systems that have "few" units, one can work around this obstruction to obtain a generalization of Euclid's proof, e.g. see my proof here.

First of all, you didn't go to a quality resource. For mathematical proofs, ProofWiki just blows Wikipedia out of the water. Try reading this: https://proofwiki.org/wiki/Euclid%27s_Theorem/Corollary_1/Proof_2 Maybe you'll like Euclid's proof better after reading that.

Now, did you try running through the proof with some actual specific numbers and seeing what you get? Let's do that now. Let's say there are only four primes: 2, 3, 5, 7. We multiply them and add 1 to get 211. This number must be composite, because we said there are only four primes. But it's coprime to the only four primes! 211 is in fact a prime number.

So we were wrong. There are in fact five prime numbers: 2, 3, 5, 7, 211. Multiply them and add 1 to get 44311. This number must be composite, because we said there are only five primes. But it's coprime to the only five primes! It turns out that $44311 = 73 \times 607$, and furthermore 73 and 607 are primes.

So we were wrong again. There are in fact seven prime numbers: 2, 3, 5, 7, 73, 211, 607. Multiply them and... Theoretically, we could carry this on forever. Each time we either find a new prime number larger than our current set of prime numbers, or we find a composite number that is divisible by primes not in our current set of prime numbers.

How long does it take for this algorithm to find 11, 13, 17, 19? I don't know, I suppose the sieve of Eratosthenes is a quicker way to give us those. That's not the point of Euclid's proof, the point is to show that there are infinitely many primes, so we can never run out of them. If we ever need a prime number not in our current list, there is at least one way to get it.

Also, it's possible that you're one of those people who don't like proofs by contradiction in any way, shape or form, and Euclid's proof that there are infinitely many primes is often presented as a proof by contradiction (I know I'll get comments from people saying Euclid's proof is not a proof by contradiction, but that's another can of worms, and it doesn't detract from my point here). Maybe you prefer proofs by construction, or proofs by induction, or proofs by deduction, I don't know. There's nothing wrong with having a philosophical preference, as long as you understand the basic principle of each method of proof.

• Euclid's proof is constructive! (You said somebody would have commented.) You exactly showed its bulk: given a (finite) list of primes, we can find another one not in the list using a well defined algorithm. But, of course, it relies on the fact that any integer $>1$ is divisible by an integer, which again admits a constructive proof: it is the least divisor greatest than $1$. – egreg Mar 6 '15 at 19:04
• Right on schedule, thank you very much. – Robert Soupe Mar 6 '15 at 19:11

Theorem: Any $n\in N$ with $n>1$ is divisible by a prime. Proof: Among the divisors of $n$ that are greater than $1$ (noting that $n$ itself is a divisor of $n$), there is a LEAST one, $M.$ Now $M$ is prime because $1<M,$ and if $M=A B$ with $A>1<B$ then $A$ would be a divisor of $n$ with $1<A<M$, which is absurd by the def'n of $M$.

Theorem (Euclid).If $p_1,...,p_k$ are primes then there is a prime $p$ not equal to any of $p_1,...,p_k.$ Proof: Let $n=1+\prod_{j=1}^kp_j.$ Now $n$ is $1$ more than a multiple of $p_j$ for $j=1,...,k$ so $n$ is not divisible by any of $p_1,...,p_k .$ But $n>1$ so by the previous theorem, $n$ has a prime divisor $p.$

Remark. For $1\leq j\leq k$ we have $n-1=p_j A_j$ with $A_j\in N.$ If $p_j$ divides $n$ then $n=p_j B_j$ with $B_j\in N.$ But then $1=n-(n-1)=p_j(B_j-A_j),$ implying that $p_j$ divides $1,$ which is absurd.