A sequence such that every rational is written infinitely Since $\Bbb Q $ is a denumerable set $ \Bbb Q =\{ r_n: r \in \Bbb Q \}$ where $r_m \neq r_n $ if $ n \neq m $
Find a sequence $\langle x_n\rangle$ of real numbers such that for each $ n \in \Bbb N $, $\{m\in \Bbb N : x_m=r_n\}$ is infinite.
I found this difficult and didn't have an idea to construct the sequence. I think what you need is a sequence such that every rational number is written infinitely, any help would be appreciated

HINT: It’s basically the same problem as constructing a sequence $\langle n_k:k\in\Bbb N\rangle$ of natural numbers such that if $m\in\Bbb N$, then $\{k\in\Bbb N:n_k=m\}$ is infinite. One way to do that is to form the sequence
$$\langle\underbrace{0},\underbrace{0,1},\underbrace{0,1,2},\underbrace{0,1,2,3},\underbrace{0,1,2,3,4},\ldots\rangle\;.$$
That’s a nice, systematic approach that can be described easily, though an actual formula for the $k$-th term is a bit harder to come up with.
A completely different approach is to let $p_k$ be the $k$-th prime number for $k\in\Bbb Z^+$. Let $n_0=n_1=0$. If $k>1$, then $k$ has a unique factorization as a product of primes; if the smallest prime factor of $k$ is $p_\ell$, let $n_k=\ell-1$. I’ll let you prove that this actually works; it’s not hard.
Either of these ideas can be adapted to your problem: think about the subscripts in your enumeration of $\Bbb Q$.
