A theorem sometimes called "Euclid's first theorem" or Euclid's principle states that if
is a prime and
, then
or
(where
means divides). A corollary
is that
(Conway and Guy 1996). The fundamental
theorem of arithmetic is another corollary (Hardy
and Wright 1979).
Euclid's second theorem states that the number of primes is infinite. This theorem, also called the infinitude
of primes theorem, was proved by Euclid in Proposition IX.20 of the Elements
(Tietze 1965, pp. 7-9). Ribenboim (1989) gives nine (and a half) proofs of this
theorem. Euclid's elegant proof proceeds as follows. Given a finite sequence of consecutive
primes 2, 3, 5, ..., , the number
(1)
|
known as the th
Euclid number when
is the
th prime, is either a new prime or the product of primes.
If
is a prime, then it must be greater than the previous
primes, since one plus the product of primes
must be greater than each prime composing the product.
Now, if
is a product of primes, then at least one of the
primes must be greater than
. This can be shown as follows.
If
is composite and has no prime factors greater
than
,
then one of its factors (say
) must be one of the primes
in the sequence, 2, 3, 5, ...,
. It therefore divides the product
. However, since it
is a factor of
,
it also divides
. But a number which divides two
numbers
and
also divides their difference
, so
must also divide
(2)
|
However, in order to divide 1, must be 1, which is contrary to the assumption that it is
a prime in the sequence 2, 3, 5, .... It therefore
follows that if
is composite, it has at least one factor greater than
. Since
is either a prime greater
than
or contains a prime factor greater than
, a prime larger than the largest
in the finite sequence can always be found, so there are an infinite number of primes. Hardy (1992) remarks that this proof is "as
fresh and significant as when it was discovered" so that "two thousand
years have not written a wrinkle" on it.
A similar argument shows that must be either prime
or be divisible by a prime
. Kummer used a variation of this proof, which is also
a proof by contradiction. It assumes that there exist only a finite number of primes
,
, ...,
. Now define
and consider
. It must be a product of primes,
so it has a prime divisor
in common with
. Therefore,
which is nonsense, so we have proved the initial
assumption is wrong by contradiction.
It is also true that there are runs of composite numbers which are arbitrarily long. This can be seen by defining
(3)
|
where
is a factorial. Then the
consecutive numbers
,
, ...,
are composite, since
(4)
| |||
(5)
| |||
(6)
| |||
(7)
| |||
(8)
| |||
(9)
|
Guy (1981, 1988) points out that while is not necessarily prime,
letting
be the next prime after
, the number
is conjectured always to be a prime known as
a Fortunate prime, though this has not been proven.