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
 A: $0/1,1/1,0/2,1/2,2/2,3/2,4/2,0/3,1/3,2/3,3/3,4/3,5/3,6/3,7/3,8/3,9/3,\dots$ gets you every positive rational infinitely often, you can work out a way to get the negative ones in there. 
A: 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$.
A: Suggestion: Start at the origin of the number line and walk to the right for a bit, taking steps of length $1$.  For instance, say you walk $10$ units to the right.  Then walk $20$ units to the left taking steps of length $\frac{1}{2}$.  Then walk $40$ units to the right taking steps of length $\frac{1}{3!}$.  Then walk $80$ units to the left taking steps of length $\frac{1}{4!}$.  And so forth.  Recording where you are on the number line after each step will give you a sequence of the type you desire.
The actual numbers above could be changed in many ways, and I encourage you to do so.  In particular how far you walk on each "switchback" only matters insofar that you need to be sure that you're wandering indefinitely farther to the left and the right.  The step size does matter a bit more: please think about why.
A: Consider a sequence $(x_k,y_k)_{k\geq1}$ starting at $(0,0)$ and going spirally through all lattice points, like so:
$$(0,0),(1,0),(1,1), (0,1), (-1,1), (-1,0), (-1,-1), (0,-1), (1,-1), (2,-1), (2,0),\ \ldots\ .$$
Then the sequence
$$r_k:=\cases{y_k/x_k\qquad&$(x_k\ne0)$ \cr 0&$(x_k=0)$\cr}$$
will assume any rational value an infinite number of times.
