The question states
Give an example of a sequence $(a_n)$ such that $\lim_{n\to\infty} |a_{n+1} − a_n| = 0$ but which is divergent.
I'm slamming my head against a table thinking of all the divergent sequences I know, but any oscillating sequences like $(-1)^n$ don't work when taking the distances between subsequent values.
I tried thinking of divergent Cauchy sequences but none seem to apply to this problem.
Any suggestions for sequences to try?
A trick for generating such examples is to find a sequence that goes to infinity, but it does it very slowly. One example where the sequence grows slowly is to take $a_n = \sqrt{n}$. For, $$ \sqrt{n+1}-\sqrt{n} = \frac{\sqrt{n+1}+\sqrt{n}}{\sqrt{n+1}+\sqrt{n}}\cdot\big(\sqrt{n+1}-\sqrt{n}\big) = \frac{1}{\sqrt{n+1}+\sqrt{n}} \to 0, $$ but $\sqrt n \to \infty$.
For an even slower sequence, take a look at $a_n = \log n$. Then $\log n\to\infty$, yet $$ \log(n+1)-\log(n) = \log\bigg(\frac{n+1}{n}\bigg) \to \log(1) = 0. $$ This example uses the identity $\log(a)-\log(b) = \log(a/b)$, the continuity of $\log$ and the fact that $\frac{n+1}{n}\to 1$.