Find a divergent sequence such that $\lim_{k \to \infty} |x_{k+p} - x_k| = 0$ for any positive integer p. Give an example of a sequence that diverges and such that for any positive integer $p$:
$$\lim_{k \to \infty} |x_{k+p} - x_k| = 0$$
I was thinking about the sequence
$$x_k = \sum_{n=1}^{k} \frac{1}{n}$$
It is divergent, but I am not sure if the condition holds because by limit definition
$$|x_{k+p} - x_k| < \varepsilon$$
But this equals to:
$$x_{k+p} - x_k = \sum_{q=k+1}^{k+p} \frac{1}{q}$$
But I am stuck stuck at this step. Can you please tell me whether this sequence is indeed the right one or not?
 A: As noticed you are done indeed
$$x_{k+p} - x_k = \sum_{q=k+1}^{k+p} \frac{1}{q}\le \frac{p}{k+1} \to 0$$
As a simpler example let consider instead
$$x_k=\log k \to \infty$$
such that
$$|x_{k+p} - x_k|=\left|\log{\left(1+\frac p k\right)} \right|\to 0$$
A: First, let's think carefully about the nesting of quantifiers:

*

*For every integer $p$:

*

*For every $\epsilon>0$:

*

*There exists a $K$ (that can depend on both $p$ and $\epsilon$):

*

*So that for every $k>K$:

*

*$|x_{k+p}-x_k| < \epsilon$.









So our strategy will be the following: let's try to prove some kind of bound on $|x_{k+p}-x_k|$ in terms of $p$, and then use that bound to cook up a formula for $K$ that works.
Well, we have
$$|x_{k+p}-x_k| = \sum_{i=k+1}^{k+p}\frac{1}{i}.$$
Writing down this sum in closed form seems tricky! But we can easily write down a bound, by using the fact that all terms of the sum are less than $\frac{1}{k}$:
$$|x_{k+p}-x_k| = \sum_{i=k+1}^{k+p}\frac{1}{i} < \frac{p}{k}.$$
For every $\epsilon > 0$, we need $|x_{k+p} - x_k| < \epsilon$. This will be true if
$$\frac{p}{k} < \epsilon$$
or
$$k > \frac{p}{\epsilon}.$$
This tells us how to pick $K$.
Can you take it from here?
A: It suffices to find such a sequence where $\lim\limits_{k \to \infty} |x_{k + 1} - x_k| = 0$.
This is because $|x_{k + p} - x_k| \leq \sum\limits_{i = 0}^{p - 1} |x_{k + i + 1} - x_{k + i}|$ by the triangle inequality. So we see that $\lim\limits_{p \to \infty} |x_{k + p} - x_k| \leq \sum\limits_{i = 0}^p \lim\limits_{k \to \infty} |x_{k + i + 1} - x_{k + i}| = 0$.
I would personally take $x_i = \sqrt{x}$. Note that $x_{k + 1} - x_k = \sqrt{k + 1} - \sqrt{k} = (\sqrt{k + 1} - \sqrt{k}) \frac{\sqrt{k + 1} + \sqrt{k}}{\sqrt{k + 1} + \sqrt{k}} = \frac{1}{\sqrt{k} + \sqrt{k + 1}}$, so $\lim\limits_{k \to \infty} |x_{k + 1} -  x_k| = 0$.
You could alternately take $x_k = \sum\limits_{i = 1}^k \frac{1}{i}$ and use the well-known divergence of the harmonic series.
