## 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?