CMPSCI 250 Discussion #4: Infinitely Many Primes

David Mix Barrington

4/6 October 2004

Solution for this discussion:

One of the earliest-discovered and most important facts about the prime numbers is that they go on forever --- however far you go in the sequence of naturals, you keep finding new primes. This was proved by the ancient Greeks.

If we want to use proof techniques for the predicate calculus, we have the immediate problem of stating this theorem in that language. We can state it in English as "There are infinitely many primes'', but as we don't have a symbol for "infinitely many'' we still have some work to do. Fortunately, another way to say the same thing is "Given any natural a, there is a prime bigger than a,'' which translates easily into ∀a:∃ b:(b>a)∧P(b), where P(b) means "b is prime''. We could, if we wanted, break down P(b) further using the definition of prime number. This language for "infinitely often'' occurs fairly frequently in mathematics, as does its negation: we can say "there are only finitely many x such that A(x) is true'' by negating the other statement and using the negation-of-quantifier rules to get "∃a:∀b:(b>a)→¬P(b)''.

Following our general proof rules for quantified statements, we need to let a be an arbitrary natural and prove that there exists a prime number b such that b>a. The obvious thing to do would be to figure out ourselves a particular prime number greater than a, and then prove that it is prime. Curiously, we're not going to do that. Because the sequence of primes is so irregular, finding the next prime after a, for example, turns out to be far more difficult than proving the existence of some prime greater than a. Our proof won't even tell us directly what the prime number greater than a is (though we could find it with a little more work).

So let a be an arbitrary natural. What we'll do is construct a natural z that isn't divisible by any of the numbers from 2 through a, by choosing z to be the factorial of a, plus one. This number z might or might not be prime itself, but as long as it has a prime divisor, that prime divisor must be greater than a because none of the naturals less than a (except 1) is a divisor of z. So some prime greater than a exists.

Writing Exercise:

  1. Let S be any finite set of naturals, not including 0 or 1. Prove that there exists a number n such that for any number i in S, n % i == 1. (In symbols, ∃n:∀i:(i∈s)→(n%i = 1).)
  2. Using proof by contradiction or otherwise, explain how the result of part (1) implies that: "∀x:∃y:(y≥x)∧(P(y)", or equivalently "there are infinitely many primes". (Recall that P(y) means "y is prime".) This will involve restating the argument from above in slightly different terms.
  3. Using proof by contradiction and the result of (1) again, prove that there are infinitely many primes p such that p % 4. (Hint: Let S be an alleged finite list of such primes.)

Last modified 6 October 2004