Sequence with all rationals as limit points Is it possible to build the sequence that has all rationals as limit points?
A limit point of a sequence $(x_n)$ is a point $x$ such that each neighborhood $(x-\varepsilon,x+\varepsilon)$ contains $x_n$ for infinitely many $n$'s. Equivalently, $x$ is a limit point if and only there is a subsequence $(x_{n_k})$ which converges to $x$.
Thank you.
 A: Fix a sequence $(a_{q,n})_n$ with $a_{q,n} \to q$ as $n \to \infty$ for every rational number $q \in \mathbb Q$ and enumerations $\phi: \mathbb N \to \mathbb Q$ and $\psi = (\psi_1,\psi_2): \mathbb N \to \mathbb N\times\mathbb N$. Now the sequence $(a_{\phi(\psi_1(n)),\psi_2(n)})_n$ has the desired property.
A: Here is an explicit sequence $(x_n)_{n\geqslant1}$ whose limit set is the extended real line $\mathbb{R}$ augmented with $\pm\infty$. For every $N\geqslant0$ and $n\geqslant1$ such that $4^N\leqslant n< 4^{N+1}$, let 

$$
x_n=2^{-N}\cdot(n-2\cdot4^N)
$$

In words, for each $N$, the sequence walks through the interval $(-a_N,+2a_N)$, starting from $-a_N$ and moving upwards with steps of length $s_N$, where $a_N=2^N$ and $s_N=2^{-N}$. Once the upper limit $+2a_N$ of the interval is reached, $N$ is replaced by $N+1$ and one begins to walk upwards through the interval $(-a_{N+1},+2a_{N+1})$ starting from $-a_{N+1}$ with steps of length $s_{N+1}$, and so on. 
Since $a_N\to+\infty$ and $s_N\to0$, the walker passes nearby every given real number $y$ over and over, closer and closer to $y$, hence every real number $y$ is a limit point of the sequence $(x_n)$.
Edit: Somewhat similarly, here is a whole class of examples. Pick some smooth function $f$ on $[0,\infty)$ whose liminf at infinity is $-\infty$ and whose limsup at infinity is $+\infty$, with bounded derivative, and some increasing nonnegative sequence $(a_n)$ such that $a_n\to\infty$ and $a_{n+1}-a_n\to0$. Then, $$x_n=f(a_n)$$ is such that $$\liminf x_n=-\infty\qquad \limsup x_n=+\infty\qquad\lim x_{n+1}-x_n=0$$ hence the set of limit points of $(x_n)$ is $[-\infty,+\infty]$ (can you prove this?). For example, choosing $$f(x)=x\cdot\sin(\log(x+1))\qquad a_n=\log n$$ yields the sequence

$$x_n=\log(n)\cdot\sin(\log(\log(n)+1))$$

A: Others have given examples. I thought it would be of interest to give a couple of "naturally occurring" examples.
EXAMPLE 1:
There exists a continuous function $f:\mathbb{R} \to \mathbb{R}$ that is nowhere differentiable in the following strong way. For each $x \in \mathbb{R}$, there exists a sequence $(x_n)$ such that $x_n \to x$ and the sequence of difference quotients
$$\frac{f(x) - f(x_n)}{x - x_n}$$
has every extended real number as a subsequence limit.
In fact, most continuous functions have this property, in the sense that all but a first (Baire) category set of continuous functions (sup norm) have this property. This Baire category result was proved by Jarnik in 1933 (reference below), and it's been strengthened and generalized in many ways since then.
Vojtech Jarnik, "Über die Differenzierbarkeit stetiger Funktionen", Fundamenta Mathematicae 21 (1933), 48-58.
http://matwbn.icm.edu.pl/ksiazki/fm/fm21/fm2119.pdf
EXAMPLE 2:
Let $(x_n)$ be a sequence of positive real numbers. What I'll call
the extended ratio test states:
(a) If $\limsup\limits_{n\rightarrow \infty }\frac{x_{n+1}}{x_{n}} < 1$, then $\sum\limits_{n=1}^{\infty }x_{n}$ converges (to a real number).
(b) If $\liminf\limits_{n\rightarrow \infty }\frac{x_{n+1}}{x_{n}} > 1$, then $\sum\limits_{n=1}^{\infty }x_{n}$ diverges to $\infty$.
(c) If $\liminf\limits_{n\rightarrow \infty }\frac{x_{n+1}}{x_{n}} \leq 1 \leq \limsup\limits_{n\rightarrow \infty }\frac{x_{n+1}}{x_{n}}$, then the test is inconclusive.
A reasonable question is to ask how strongly (c) can hold when $\sum\limits_{n=1}^{\infty }x_{n}$ converges.
Lennes (reference below) gives an example of a sequence $(x_n)$
of nonzero real numbers such that $\sum\limits_{n=1}^{\infty }x_{n}$ converges absolutely and every extended real number is a subsequence limit
of the sequence $\left( \frac{x_{n+1}}{x_{n}} \right)$. Therefore, if we take such a sequence $(x_n)$, then the sequence $(|x_n|)$ of positive real numbers has the property that $\sum\limits_{n=1}^{\infty }|x_{n}|$ converges and the set of subsequence limits of $\left(\frac{|x_{n+1}|}{|x_{n}|}\right)$ is equal to $[0,\infty]$.
Nels Johann Lennes, "The ratio test for convergence of series", American Mathematical Monthly 46 #7 (Aug.-Sept. 1939), 434-436. [J. Barkley Rosser gives a slightly simpler construction in a "Note by the Editor" at the end of the paper.]
A: If you want the set of limit points to be exactly $\mathbb{Q}$, the answer is that no such sequence exists:
The set of limit points of a sequence of real numbers is necessarily closed.
To see this, suppose that $s$ is a point in the closure of the limit set of $\{a_n\}$. Then for every $\epsilon\gt 0$ there exists a limit point $\ell$ of the sequence such that $|s-\ell|\lt\epsilon$.
For each natural number $n$, let $\ell_n$ be a limit point such that $|s-\ell_n|\lt 2^{-n-1}$. Now define a subsequence of $a_n$ recursively as follows:
Let $n_1$ be an index such that $|a_{n_1}-\ell_1|\lt 2^{-2}$; let $n_2$ be an index greater than $n_1$ such that $|a_{n_2}-\ell_2|\lt 2^{-3}$. Continue this way; assume that we have defined $n_1\lt n_2\lt \cdots \lt n_k$ such that $|a_{n_j}-\ell_j|\lt 2^{-j-1}$. Define $n_{k+1}$ to be an index greater than $n_k$ such that $|a_{n_{k+1}} - \ell_{k+1}|\lt 2^{-k-2}$.
These choices can be made, since $\ell_j$ is a limit point of $\{a_n\}$, so there is a subsequence converging to $\ell_j$, hence for every $N$ and every $\epsilon\gt 0$ there exists $k\geq N$ such that $|a_k-\ell_j|\lt \epsilon$.
Thus, we have defined a subsequence of $\{a_n\}$ recursively; now note that $$|s-a_{n_k}| \leq |s-\ell_k|+|\ell_k-a_{n_k}| \lt 2^{-k-1}+2^{-k-1} = 2^{-k}.$$
Thus, $a_{n_k}$ converges to $s$, so $s$ is also a limit point of $\{a_n\}$. Thus, the set of limit points of $\{a_n\}$ is closed. In particular, no sequence can have $\mathbb{Q}$ as its set of limit points.
However, if you want the sequence to include $\mathbb{Q}$ among its limit points (and therefore to have $\mathbb{R}$ (and also $\infty$ and $-\infty$)) as its set of limit points, then this is possible. Alexander Thumm has posted an answer while I was writing this, so I don't need to give a construction.
