I stumbled across the following series reviewing some HW from a few years ago
$\sum_{i=1}^{n}\left(\sum_{j=i}^{n}\frac{1}{j}\right)^2$ i.e. $(\frac{1}{1}+\frac{1}{2}+\ldots+\frac{1}{n})^2+(\frac{1}{2}+\ldots+\frac{1}{n})^2+\ldots+(\frac{1}{n})^2$
This series equals $2n-\sum_{i=1}^{n}\frac{1}{i}$, which I have confirmed with some code. I am curious if anyone can give a hand in trying to show this relation. So far, writing $\sum_{i=1}^{n}\frac{1}{i}$ as $S_n$, I have rewritten the sum as
$S_n^2+(S_n-S_1)^2+(S_n-S_2)^2+\ldots +(S_n-S_{n-1})^2$
But have been stuck at dead ends using this approach. Any thoughts or hints would be greatly appreciated.