The infinitude of prime numbers – a topological proof

In this post we discuss a proof for the infinitude of primes that uses topology (due to Furstenberg, see [2]). This is an interesting proof that gives a topological view point to a very familiar and basic mathematical fact. It is an elegant proof that is worthy to be considered as straight from “The Book” by Paul Erdos (at least “The Approximate Book”). Specifically it is one of the six proofs for the infinitude of primes found in [1].

Let \mathbb{Z} be the set of all integers and \mathbb{P} be the set of all prime numbers. The key to the proof is to define a topological space on \mathbb{Z} such that the assumption that \mathbb{P} is finite will contradict some fact about this topological space.


Defining the Topological Space

For any a,b \in \mathbb{Z} with b>0, define B_{a,b}=\left\{a+k b: k \in \mathbb{Z} \right\}. Let \mathcal{B} be the set of all possible B_{a,b}. We show that \mathcal{B} is a base for a topology on the space \mathbb{Z}.

We can visualize B_{a,b} by thinking a being in the center and the other points of B_{a,b} are generated by adding integer multiples of b to the center a (in both the positive and negative directions). A useful observation is that we can make any point in B_{a,b} the center and we can still generate the same set B_{a,b}. Specifically, for each x \in B_{a,b}, we have B_{x,b}=B_{a,b}.

We now show that \mathcal{B} is a base for a topology on \mathbb{Z}. Clearly \mathcal{B} is a cover of \mathbb{Z}. Next we show that if x \in B_{a,b} \cap B_{c,d}, then there is some B_{e,f} with x \in B_{e,f} \subset B_{a,b} \cap B_{c,d}.

Let x \in B_{a,b} \cap B_{c,d}. Based on the observation made above, we have B_{a,b}=B_{x,b} and B_{c,d}=B_{x,d}. So we have x \in B_{x,b} \cap B_{x,d}. Observe that x \in B_{x,b d} \subset B_{x,b} \cap B_{x,d}.

Let X denote the space \mathbb{Z} with the topology generated by the base \mathcal{B}. We need the following facts:

  • Every non-empty open subset of X is infinite.
  • Every B_{a,b} \in \mathcal{B} is a closed set in X

The first bullet point is clear since every non-empty open set would have to contain one B_{a,b}, which is infinite. To see that B_{a,b} is closed, let x \in X-B_{a,b}. Observe that:

    \displaystyle x \in B_{x,b} \subset X-B_{a,b}

Thus the complement of B_{a,b} is open is X.


The Infinitude of Primes

We now tie this topological space to the prime numbers. Recall that \mathbb{P} denotes the set of all prime numbers. Also recall that any integer not equaled to 1 or -1 has a prime divisor. Thus we have the following:

    \displaystyle \bigcup_{p \in \mathbb{P}} B_{0,p}=X-\left\{1,-1 \right\}

If \mathbb{P} is finite, then the left-hand side of the above equation is a closed set (being the union of finitely many closed sets). This implies that \left\{1,-1 \right\} is an open set in the space X, which is impossible since every non-empty open set in this space is infinite. Thus \mathbb{P} must be infinite.


Some Comments About This Topological Space

The topological space X generated by the base \mathcal{B} has nice topological properties. It is Hausdorff. It is regular since the base \mathcal{B} consists of open and closed sets. It is a separable metric space since it has a countable base. The space X is non-discrete at every point. Thus it differs from the usual topology on the integers.



  1. Aigner, M., Gunter, M.Z. Proofs from THE BOOK, third edition, Springer-Verlag, Berlin, 2004.
  2. Furstenberg, H., On the infinitude of primes, Amer. Math. Monthly, 62, 353, 1955.


\copyright \ 2013 \text{ by Dan Ma}