The answer to the question of how many prime numbers exist is given by the fundamental theorem:
There exist infinitely many prime numbers.
Euclid was the first to prove this (ca 350 B.C.). His proof is also one of the simplest.
Euclids Proof. Suppose that p1 = 2 < p2 = 3 < . . . < pr are all the primes. Let
and let p be a prime
dividing P; then p cannot be any of p1, p2, . . . , pr, otherwise p would
divide the difference P p1p2 . . . pr = 1, which is impossible. So this prime p is still another prime, and
However the proof of Euclids theorem does not give us a way of producing new primes since
One of the ways to find all primes less than or equal to N is to list all numbers less than or equal to N and then cross out all multiples of primes. Those numbers left must be primes. This method is called the Sieve of Eratosthenes, named after Eratosthenes (in the third century B.C.) but is obviously not practical for larger numbers. For example if we take N = 100, and we mark in red all multiples of primes, then the remaining numbers (in white) are all the primes.
In 1845 Bertrand
For n >1, between n and 2n there is always a prime number.
This was proved by Tschebycheff in 1852.
In 1837 Dirichlet
There exist arbitrarily long stretches of numbers which do not contain a prime. For example
1000! +2, 1000! +3, . . . , 1000! +1000
is a stretch of 999 consecutive composite numbers.