# What are your favorite instructional counterexamples on sequences?

In this article, I give counterexamples regarding real sequences. And in that one some others.

In particular counterexamples answering questions like: "If for all $p \in \mathbb{N}$ $\lim\limits_{n \to +\infty} (u_{n+p} – u_n)=0$ then $(u_n)$ converge?" or "if $\lim (u_{2n} – u_n) = 0$ and $(u_n)$ is increasing then $(u_n)$ converges.

What are you favorite instructional counterexamples on sequences? That can be about convergence, limit set...

I would prefer to focus on sequences of reals, complexes or finite dimensional vectors. And avoid series (I know it is a bit artificial) or sequences of maps.

• This is an interesting question, up vote! – Henr.L Feb 1 '15 at 10:03

Show that the series $$1-\frac{1}{2}-\frac{1}{2}+\frac{1}{3}+\frac{1}{3}+\frac{1}{3}-\frac{1}{4}-\frac{1}{4}-\frac{1}{4}-\frac{1}{4}++ -- \cdots$$ converges to all of the interval $[0,1]$. This is an example (not so much a counter-example) of a series whose $n$-th term tends to zero, but the series diverges spectacularly: the set of limit points is the whole interval $[0,1]$.

My favorite counterexample is one about exchange of limits: $$a_{n, m} =\frac{n}{n+m}.$$ It is indeed pretty simple to see that $\lim_{n\to\infty} \lim_{m\to\infty}a_{n, m} \neq \lim_{m\to\infty} \lim_{n\to\infty}a_{n, m}$.

My favorite counterexamples using sequences is, in fact, with regards to continuity.

Many starting students have this notion in their head that to be continuous is essentially being able to draw the graph of a function without being able to pick up their pencils (pens, quills?, etc). Now, this is true for many functions that they are subject to in the usual beginning calculus sequence, but I like to mention that it is possible to be continuous at only one point or even continuous on only a uncountable set based upon the definition of continuity.

For example:

1. Consider $f(x) = \left\{ \begin{array}{lr} x & : x \in \mathbb{Q}\\ 0 & : x \notin \mathbb{Q} \end{array} \right.$. This function is only continuous at 0 via for all sequences going to 0, the function converges to 0. Edit: To elaborate a little more, let $\lim_{n \to \infty} x_n =0$, then $\lim_{n \to \infty} f(x_n) = 0$, no matter if the $x_n$ are rational or irrational. But if $\lim_{n \to \infty} x_n =x$ where $x \neq0$, then if $x_n \notin \mathbb{Q}$ so that $\lim_{n \to \infty} f(x_n) = 0$ while if $x_n \in \mathbb{Q}$, then $\lim_{n \to \infty} x_n =x$. Such sequences can be constructed as the rationals are dense in the reals.

2. Thomae's function: $f(x) = \left\{ \begin{array}{lr} 1/q & : p/q \in \mathbb{Q} \text{ with$p/q$in lowest terms and$q>0$}\\ 0 & : x \notin \mathbb{Q} \end{array} \right.$. This is continuous on the irrationals, but discontinuous on the rationals again by looking at sequences, though, there are other methods for testing continuity here.

• These are indeed interesting functions, but the OP asked for sequences. Could you convert one or both of your examples to a sequence? – Rory Daulton Feb 1 '15 at 18:28
• I've added a bit about the sequences for the first one. – Chris C Feb 2 '15 at 1:49

Directly referring to the phenomenon in the title: Consider $$x_n = \sum_{k=1}^n \frac{1}{k}.$$ Then for any $p$ and $n\to\infty$ $$|x_{n+p}-x_n| = \sum_{k=n+1}^{n+p}\frac1k \leq \frac{p}{n+1}\to 0.$$ But $(x_n)$ does not converge.

Well, that's really about series but still is a valid example.

On a more applied note: If some studies optimization algorithms, then one often proves convergence of some algorithm by first noting that $\|x_{n+1}-x_n\|\to 0$ then additionally show boundedness of the $x_n$'s and then improve to $\sum_{k=1}^\infty\|x_{k}-x_{k-1}\|<\infty$ which shows that the sequence is Cauchy…