# Showing Harmonic series is divergent. (question on summation properties)

I am wondering how to understand a part of the summation notation used to show that the harmonic series $\sum_{n=1}^{\infty}\frac{1}{n}$ diverges.

Let $(s_{N})_{N}$ be the sequence of partial sums associated to the Harmonic series. To see how this sequence diverges, consider the following for every $n\in \mathbb{N}$:

$\sum_{n=2^{m-1}+1}^{2^{m}}\frac{1}{n}\geq \sum_{n=2^{m-1}+1}^{2^{m}}\frac{1}{2^{m}}=\frac{2^{m}-(2^{m-1}+1)+1}{2^{m}}=\frac{1}{2}$

Then:

$s_{2^{m}}= \sum_{n=1}^{2^{m}}\frac{1}{n}=\sum_{r=1}^{m}\left ( \sum_{n=2^{r-1}+1}^{2^{r}}\frac{1}{n} \right ) \geq \sum_{r=1}^{m}\frac{1}{2}=\frac{m}{2}$

which is unbounded and hence divergent.

The part $\sum_{n=1}^{2^{m}}\frac{1}{n}=\sum_{r=1}^{m}\left ( \sum_{n=2^{r-1}+1}^{2^{r}}\frac{1}{n} \right )$ is where I don't understand. I am not super strong with summation algebra/properties and so I am not sure how this sum became two sums.

For every sequence $f(k)$, we have $$\sum^{n-1}_{s=0}\;\;\sum^{2^{s+1}-1}_{k=2^{s}}f(k)=\sum^{2^{n}-1}_{k=1}f(k) .$$
$$\sum^{n-1}_{s=0}\;\;\sum^{2^{s+1}-1}_{k=2^{s}}f(k)= \sum^{n-1}_{s=0}\;\;[\sum^{2^{s+1}-1}_{k=0}f(k) - \underbrace{\sum^{2^{s}-1}_{k=0}f(k)}_{g(s)}]= \sum^{n-1}_{s=0} g(s+1)-g(s) = g(n)-g(0) =\sum^{2^{n}-1}_{k=1}f(k).$$
Ps: with that identity we can prove the cauchy condensation test: Let $(x_n)$ be a decrescent sequence of positive terms, then $\sum x_k$ converges $\Leftrightarrow$ $\sum 2^k.x_{2^k}$ converges. And use it to show that the Harmonic series is divergent (and many other series)