$a_n $ is a sequence which maps the natural numbers onto the rational numbers between 0 and 1. I have to show that when $l \in [0,1] $ that there exists a subsequence $b_n$ which converges to $l$
I don't know how to start this formal proof. Can somebody give me a hint how I can start this proof?
PS. $[0,1]$ is a number between 0 and 1.
Note the important fact that in any interval $(c,d)$ with $c < d$ there exists a rational and an irrational in $(c,d)$. In fact, there are infinitely many rationals in this interval. (Take for example, the first $n$ terms decimal expansion of $d$ will eventually be in $(c,d)$ for sufficiently large $n$.)
Now here's a proof sketch:
Let $\ell \in [0,1]$. Pick $n_1$ such that $a_{n_1} \in (0,1) \cap (\ell-1,\ell+1)$. Since $(a_n)$ is a mapping onto the rationals, and by the property in the previous paragraph, such $n_1$ must always exist. Recursively build a sequence of indices $n_1 < n_2 < \cdots < n_k$ such that
$$ \left| a_{n_j} - \ell \right| < \frac{1}{j} \text{ for } 1 \le j \le k $$
Then pick $n_{k+1}$ such that $n_{k+1} > n_k$ and
$$ a_{n_{k+1}} \in (0,1) \cap \left(\ell - \frac{1}{k+1}, \ell + \frac{1}{k+1}\right). $$
Proceeding recursively, we obtain a subsequence $(a_{n_k})$ such that
$$ \left| a_{n_j} - \ell \right| < \frac{1}{j} \to 0 \text{ as } j \to\infty. $$