Divergent bounded sequence such that limit of the difference between two consecutive elements is zero

I'm asked to give an example of a sequence $a_n$ which is bounded, have no limit and upholds this rule: $\lim_{n\to \infty}|a_{n+1}-a_n|=0$. I tried a lot of sequences but it didn't work.


Solution 1:

Consider the $k$th triangular number, let's say $T_0=0$ and $T_k=\frac{k(k+1)}{2}$ for any integer $k>0$. Now define the sequence $b_n$ as follows: $$b_n=(-1)^{k+1}\frac{1}{k}\qquad\text{iff }\;\;T_{k-1}<n\le T_k$$ The first terms of this sequence are: $$1,\;-\frac12,\;-\frac12,\;\frac13,\;\frac13,\;\frac13,\;-\frac14,\;-\frac14,\;-\frac14,\;-\frac14,\;\frac15,\;\frac15,\;\frac15,\;\frac15,\;\frac15,\ldots$$ And let $$a_n=\sum_{j=1}^nb_j$$ You can prove that for all integer $n>0,\;\;a_n$ is bounded: $$0\leq a_n\leq 1$$ It does not converge since $$a_n=1\qquad\text{if }\;\;n=T_{2p-1}\;\text{ for any integer }p>0\\a_n=0\qquad\text{if }\;\;n=T_{2p}\;\text{ for any integer }p>0$$

Solution 2:

If you mean for $(a_n)$ to be a sequence, then consider the sequence

$$1,-1/2,-1/2, 1/3,1/3,1/3,-1/4,-1/4,-1/4,-1/4,\dots$$