# 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.

• Do you want the set of limit points to be just the rationals, or to include all rationals (and possibly other limit points as well)? – Arturo Magidin Jul 12 '11 at 7:46

## 4 Answers

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.

• Er, I'm probably wrong, but is the following proof also correct? Suppose such a sequence $\{a_n\}$ exists, and let $S$ be the closure of $\{a_n\}$. So $S$ contains $\mathbb{Q}$ and is closed, so it contains irrational points. Edit: Oh well, I guess I used the fact that the closure of a set (here defined as set + all its limit points) is closed, which may require proof depending on one's defintions. – ShreevatsaR Jul 12 '11 at 9:01
• @ShreevatsaR: Note that the closure of the sequence includes the limit points (one must prove this, of course), but in general may be larger than the set of limit points (e.g., take the sequence $a_1=2$, $a_n=1$ for all $n\gt 1$; then the closure of $\{a_n\}$ is $\{1,2\}$, but the set of limit points is just $\{1\}$). So showing that the closure of $\{a_n\}$ is larger than $\mathbb{Q}$ is not the end of the argument. – Arturo Magidin Jul 12 '11 at 14:08
• Sure, but all elements in the closure that are not limit points are elements of the original sequence (as I said, I was using the definition of closure as set + its limit points), and there are uncountably many irrational numbers in the closure but only countably many can be from the original sequence. :-) – ShreevatsaR Jul 12 '11 at 14:14
• @ShreevatsaR: I didn't say it wasn't easy to finish the argument, just that it wasn't "the end" of it. (-; – Arturo Magidin Jul 12 '11 at 14:16

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.

• Or you could just use the sequence $(\phi(n))_n$ given by your enumeration $\phi$ of the rationals. – user83827 Jul 12 '11 at 17:30
• Yes you could, but its shorter to prove it this way :D – Alexander Thumm Jul 12 '11 at 23:36
• In a sense. It probably takes less time to write $(q - 1/n)_n \rightarrow q$ than it does to read your formula! (And of course I understand that you're illustrating a general principle, so please take this with a grain of salt.) – user83827 Jul 13 '11 at 12:02

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))$$

• Same idea, but simpler sequence. $$b_n= \frac{n-2^{\lfloor \log_2(n) \rfloor}}{2^{\lfloor \log_2(n) \rfloor}}$$ takes all the values in the set $\{ \frac{k}{2^m} | 0 \leq k < 2^m \}$, and thus is dense in $[0,1]$. Then $a_n =\arctan [ \pi (b_n-\frac{1}{2})]$ is dense in $\mathbb R$. – N. S. Jul 12 '11 at 17:24
• @user9176: Simpler? // Who is $a_8$? – Did Jul 13 '11 at 18:45
• @N.S. / user9176: Not interested in clarifying your comment? – Did May 28 '17 at 8:52

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.]