Euclid’s Proof of Theorem 4 is as follows:

Let be the aggregate of primes up to , and let
Then is not divisible by any of the numbers . It is therefore either prime, or divisible by a prime between and . In either case there is a prime greater than , which proves the theorem. The theorem is equivalent to

If is the th prime and is defined as above. It is plain that

for , and so that

This inequality enables us to assign an upper limit to the rate of increase of , and a lower limit to that of .
We can obtain better limits as follows. Suppose that

for . Then Euclid’s argument shows that

Since for , it is true for all .
Suppose now that and
And so
by Since we deduce that

for and it is clear that the inequality holds also for
We have therefore proved:
Theorem 10:
We have thus gone beyond Theorem 4 and found a lower limit for the order of magnitude of . The limit is of course an absurdly weak one, since for it gives , and the actual value of over 50 million.

Euclid/‘s argument may be developed in other directions
Theorem 11: There are infinitely many primes of the form
Define by instead of by . Then is of the form and is not divisible by any of the primes up to . It cannot be a product of primes only, since the product of two numbers of this form is of the same form, and therefore it is divisible by a prime greater than .

Theorem 12: There are infinitely many primes of the form .
The proof is similar to that of theorem 11. We define by and observe that any prime (other than 2 or 3) is or m and that the product of two numbers is of the same form.
The progression is more difficult. We must assume the truth of a theorem we will prove in 20.3

Theorem 13: If and have no common factor, then any odd prime divisor of is of the form .

Theorem 14: There are infinitely many primes of the form .
We take a sum of 2 squares which have no common factor. The square of an odd number is , and is , so is or , and that the product of 2 numbers is of the same form, we can complete the proof as before.

All of the above theorems are particular cases of a famous theorem of Dirichlet

Theorem 15 (Dirichlet’s Theorem): If is positive and and have no common divisors except 1, then there are infinitely many primes of the form

The second proof of Theorem 4 depends on a property of Fermat’s numbers.
Fermat’s numbers are defined by
and so
The relevant property of Fermat numbers is as follows:
Theorem 16: No two Fermat numbers have a common divisor greater than 1
Suppose that and , where are two Fermat numbers, and that
If we have

And so . Hence
And therefore . Since is odd, , proving the theorem
It follows that each of the numbers is divisible by an odd prime prime that does not divide any of the others, and therefore there are at least odd primes not exceeding . This proves Euclid’s Theorem.

Additionally,

This inequality is a little stronger than (2.2.1), leads to a proof of Theorem 10.

The first four Fermat numbers are prime, and Fermat conjectures that all were prime. Euler, however, found in 1732 that
is composite, as divides each of and so and divides their difference

In 1880, Landry proved that

More recent writers have proved that is composite for

and for and many larger values of .
No factor is known for , but for all other cases provided to be composite, a factor is known.
No prime has been found beyond , It is perhaps more probable that the number of primes is finite; if this is true, then the number of primes is finite.

Theorem 17: If and is prime, then is even and
Proof: If is odd, then is even, and if has an odd factor and , then is divisible by

It is interesting to compare Fermat’s conjecture with another famous conjecture concerning the primes of the form . We begin with another trivial theorem of similar type to theorem 17.

Theorem 18: If and is prime, then and is prime.
Proof: If , then ; and if then , then we have .
Thus, the problem of the primality of is reduced to that of the primality of .

It was shown by Mersenne in 1644 that is prime for and composite for the other 44 values of less than 257.
The first mistake in Mersenne’s statement was found around 1886, when Pervusin and Seelhoff discovered that is prime. Subsequently, four further mistakes were found in Mersenne’s statement and it need no longer be taken seriously.

In 1876 Lucas found a method for testing whether is prime, and used it to prove prime. This remained the largest known prime until 1951, when, using different methods, Ferrier found a larger prime number, and Miller and Wheeler found several large primes, of which the largest was
It is now shown that is prime for
and composite for all other . The largest known prime is thus , a number of 6533 digits.

We will describe Lucas’s test in 15.5 and give the test used by Miller and Wheeler in Theorem 101.
The problem of Mersenne’s numbers is connected with that of “perfect numbers”, which will be considered in 16.8

Suppose that are the first primes and let be the number of not exceeding which are not divisible by any prime . If we express such an in the form where is “quadratfrei” (i.e. is not divisible by the square of any prime), we have
with every either 0 or 1. Then there are just possible choices of the exponents and so no more than different values of . Again, and so there are no more than different values of . Hence,
If theorem 4 is false, so that the number of primes is finite, let the primes be . In this case, for all and so
Which is false for
We can use this argument to prove 2 further results

Theorem 19: The series
is divergent.
Proof: If the series is convergent, we can choose such that the remainder after terms is less than , i.e.

The number of which are divisible by is at most . Hence , the number of divisible by one or more of is no more than
Hence, by

which is false for , hence the series diverges

Theorem 20: for ,
Proof: We take such that and . We have

and the first part of the theorem follows on taking logarithms. If we put , so that , the second part is immediate.