Limit points / cluster points from $a:$ $\mathbb {N} \rightarrow \mathbb {Q}$ So i have the bijection $a:$ $\mathbb {N} \rightarrow \mathbb {Q}$.
I was asked to find the limit points / cluster points of the sequence $a_n = a(n)$.
I know that this bijection exists since $\mathbb {N}$ and $\mathbb {Q}$ are both countable. After reading up in my script, I know how they constructed it using Cantor's diagonal argument. This is where I'm stuck though, since I just read that apparently this sequence has every real number as a limit point of the sequence. How can this be proven?
 A: You don't need to know how $a$ is defined. Let $a : \Bbb{N} \to \Bbb{Q}$ be any bijection. Given any real number $x$ and $\epsilon > 0$, there are infinitely many rational numbers $q \neq x$ with $|x - q| < \epsilon$ and as each such $q$ is $a_k$ for some $k$, $x$ is a limit point of the sequence $a_1, a_2, \ldots$. You can describe a subsequence that converges to $x$ explicitly, by defining $n_k$ to be the smallest $n$ such that $a_n \neq x$ and $|x - a_n| < \frac{1}{k}$ for $k = 1, 2, \ldots$. Then $\lim_{k \to \infty}a_{n_k} = x$.
A: The sequence is given by $$a_{\frac{q(q-1)}{2}+p}=\frac{p}{q},\quad p\leq q.$$

*

*If $\lambda \in (0,1]\cap \mathbb Q$, then $\lambda =\frac{p}{q}$ for some $p,q\in\mathbb N^*$, $p\leq q$. Taking $$m_k=\frac{kq(kq-1)}{2}+kp,$$
then $x_{m_k}=\lambda $.


*If $\lambda =0$, the argument is similar.


*If $\lambda \in (0,1)\setminus \mathbb Q$, by density of $\mathbb Q$ in $\mathbb R$, there are $(p_k)$, $(q_k)$ where $p_k\leq q_k$ and $$\lim_{k\to \infty }\frac{p_k}{q_k}=\lambda .$$
Set $m_k=\frac{kq_k(kq_k-1)}{2}+kp_k$, and then $(x_{m_k})$ is a subsequence that converges to $\lambda $.
