If $T_n = \{\frac{a}{n} \mid a \in \mathbb{Z}\}$, then what are $\bigcup_{n\in\mathbb{N}}T_n$ and $\bigcap_{n\in\mathbb{N}}T_n$?

You are correct that the union is just $\mathbb{Q}$. As you noted, every pair $(a,n)$ appears in the union and so we have all the rationals. On the other hand, as noted in a comment, the intersection cannot be all the rationals. Clearly the integers are a subset the intersection since every $(mn)/n$ will appear in each $T_n$. Now suppose some rational $p/q$ with $gcd(p,q)=1$ and $q \neq 1$ is in the intersection. Then $p/q$ is not in $T_p$, since $p$ and $q$ are relatively prime (there is no integer $x$ so that $p^2 = xq$ is $p$ and $q$ are relatively prime). Thus, the intersection is simply the integers.


You are correct that $\bigcup_{n\in\mathbb{N}}T_n=\mathbb{Q}$. That's simply because any $q\in\mathbb{Q}$ is of the form $q=\frac{a}{b}$ for some $a\in\mathbb{Z}$ and $b\in\mathbb{N}$ and so $q\in T_b$.

You are wrong that $\bigcap_{n\in\mathbb{N}}T_n=\mathbb{Q}$. This has no chance of happening since $\bigcap_{n\in\mathbb{N}}T_n\subseteq T_m$ for any $m$ and each $T_m$ is a proper subset of $\mathbb{Q}$.

So first note that if $n\in\mathbb{Z}$ then $n\in T_b$ for any $b\in\mathbb{N}$. That's because $n=\frac{bn}{b}$ regardless of $b$. Meaning $\mathbb{Z}\subseteq T_b$ for any $b\in\mathbb{N}$ and so $\mathbb{Z}\subseteq\bigcap_{n\in\mathbb{N}}T_n$.

We will show that $\bigcap_{n\in\mathbb{N}}T_n\subseteq\mathbb{Z}$. So assume that $q\in\mathbb{Q}\backslash\mathbb{Z}$, i.e. $q=\frac{a}{b}$ for some $a\in\mathbb{Z}\backslash\{0\}$ and $b>1$ relatively prime. Obviously $q\in T_b$. Take a prime number $p$ not dividing $b$. It is enough to show that $q\not\in T_p$. Indeed, $\frac{a}{b}=\frac{x}{p}$ implies $ap=xb$ which cannot hold since $b>1$ is relatively prime with $a$ and with $p$.

This shows that $\bigcap_{n\in\mathbb{N}}T_n =\mathbb{Z}$.