A collection of arithmetic series in $\mathbb Z$ is a basis for a topology 
Show that the collection of arithmetic series $S(a,b)=\{an+b\mid n\in \mathbb Z\}$ in $\mathbb Z$ is a basis for a topology.

I know the definition of basis of topology, but I don't know how to approach this question.
This is not a homework question, I'm preparing myself for a quiz.
 A: In order for the collection of all sets $S(a,b)$ to form a basis, they must satisfy two conditions: a) Every integer in $\mathbb{Z}$ must belong to some basis element; b) If an integer lies in two basis elements, then there exists a third basis element containing that integer and contained in the intersection of the two basis elements.
The first condition holds because $\mathbb{Z} = S(1,0)$. The second condition holds because if $x$ lies in the intersection of the two arithmetic sequences $S(a,b)$, $S(a',b')$, then we have $S(a,b) \cap S(a',b') = S(\operatorname{lcm}(a,a'),x)$.
Interesting fact: this result is the basis (hehe) for Furstenberg's topological proof of the infinitude of primes. A few years back I made some slides for a short presentation concerning this cute result; you can find them here if you are interested.
A: This follows from the fact that, if $a,a'\in\mathbb{Z}\setminus\{0\}$ and $b,b'\in\mathbb Z$, then $S(a,b)\cap S(a',b')$ is either empty or another set of the type $S(a'',b'')$.
