# A bit of topology

This proof is due to Hillel Fürstenberg, and is topological.

Let’s define a topology on $\mathbb Z$. We’ll declare any infinite arithmetic sequence to be open. That is, each set

$U_{a,b}=\{\dots,-2a+b,-a+b,b,a+b,2a+b,\dots\}$

is open. These are the basic open sets, so any open set can be obtained by taking unions and finite intersections of these. It’s not hard to see that a finite intersection of these is empty, or infinite. That is, there are no finite open sets other than $\varnothing$.

Another fun fact about this topology is that each $U_{a,b}$ is also closed. Indeed

$U_{a,b}=\mathbb Z\setminus\displaystyle\bigcup_{i\ne b}U_{a,i}$.

This is probably poor notation, but I mean that $i$ runs from $0$ to $a-1$, but skips $b$. So $U_{a,b}$ is the complement of an open set and hence closed. All I will really need is that $U_{a,0}$ is closed

Now, if there were only finitely many primes, then $\bigcup_{p}U_{p,0}$ would be a closed set. This set consists of any number which is a multiple of some prime. It’s complement is $\{-1,1\}$ which has to be open. This is a contradiction, because finite sets cannot be open. Cool, huh?

There was a huge thread on mathoverflow a while back arguing about whether this is really just Euclid’s proof couched in the language of topology. The argument could also be phrased this way. Say that a set $S$ of integers is periodic if for some positive integer $n$, we have $x \in S$ iff $x + n \in S$. Then the union of a period $p$ set with a period $q$ set is a set of period $pq$ (here periods do not have to be minimal). Complements of periodic sets are also periodic (if the period is $p$ then the complement will be the union of the “missing” congruence classes mod $p$). If there were only finitely many primes, then $\{1,-1\}$ is periodic, contradiction. But, if we unravel this argument, really we are just looking at $p_1 p_2 \ldots p_n \pm 1$ so it’s Euclid’s argument all over again.