Convergence of $S_p = \sum_{k=1}^{p}\left( \sum_{j=1}^{k}\frac{r^{k-j}}{j}\right)^2$ I'm looking at the following sum
$$ S_p = \sum_{k=1}^{p}\left( \sum_{j=1}^{k}\frac{r^{k-j}}{j}\right)^2$$
where $r \in (0,1), p > 1$. The goal is to inspect whether the sum converges to some constant, as $p \rightarrow \infty$.
Judging solely by the numerical evaluations I'm guessing that the sums should converge to some value, but not sure how to get there analytically.
One idea was to try finding some smaller upper bound for the inner summation to extract the $\frac{1}{j}$ out to $\frac{1}{k^2}$ or something close (if that makes sense), but haven't found the way so far.
Are there any known results that might work here?
 A: The convergence is not hard to see, but we can evaluate the limit using multiple sums. And, even not assuming their convergence yet, all the interchanges of summation below are still valid, since all the terms are nonnegative. The convergence then follows from the final result.
\begin{align*}
\sum_{n=1}^\infty\left(\sum_{k=1}^n\frac{r^{n-k}}{k}\right)^2&=\sum_{n=1}^\infty\sum_{j,k=1}^n\frac{r^{2n-j-k}}{jk}
\\&=\sum_{j,k=1}^\infty\frac{1}{jk}\sum_{n=\max\{j,k\}}^\infty r^{2n-j-k}
\\&=\frac{1}{1-r^2}\sum_{j,k=1}^\infty\frac{r^{2\max\{j,k\}-j-k}}{jk}
\\&=\frac{1}{1-r^2}\left(\sum_{k=1}^\infty\frac{1}{k^2}+2\sum_{k=2}^\infty\sum_{j=1}^{k-1}\frac{r^{k-j}}{jk}\right)
\\&=\frac{1}{1-r^2}\left(\frac{\pi^2}{6}+2f(r)\right)
\end{align*}
where, after replacing $j$ with $k-j$ in the inner sum,
\begin{align*}
f(r)&=\sum_{k=2}^\infty\sum_{j=1}^{k-1}\frac{r^j}{k(k-j)}=\sum_{j=1}^\infty\sum_{k=j+1}^\infty\frac{r^j}{k(k-j)}
\\&=\sum_{j=1}^\infty\frac{r^j}{j}\sum_{k=j+1}^\infty\left(\frac1{k-j}-\frac1k\right)=\color{blue}{\sum_{j=1}^\infty\frac{r^j}{j}\sum_{k=1}^j\frac1k}
\\&=\sum_{k=1}^\infty\frac1k\sum_{j=k}^\infty\int_0^r x^{j-1}\,dx=-\int_0^r\frac{\log(1-x)}{x(1-x)}\,dx
\end{align*}
(the "blue" sum is clearly convergent). Using the dilogarithm, we then have $$\sum_{n=1}^\infty\left(\sum_{k=1}^n\frac{r^{n-k}}{k}\right)^2=\frac{1}{1-r^2}\left(\frac{\pi^2}{6}+\log^2(1-r)+2\operatorname{Li}_2(r)\right).$$
A: Here is an alternative answer, which doesn't give an explicit expression for the limit, but I think requires less technology and is more flexible.
Since all the summands are nonnegative, is is enough to find a summable upper bound. Let:
$$u_k := \sum_{j=1}^k \frac{r^{k-j}}{j}.$$
Note that $r^{k-j}$ is small when $j$ is close to $1$, so when $1/j$ is large. Conversely, $r^{k-j}$ is large when $j$ is close to $k$, so when $1/j$ is small. This is something we shall have to use: a naive approach to split the sum à la Cauchy-Schwarz won't work (it will only give that $u_k$ is bounded by a constant). Indeed, if we replace $u_k$ with
$$v_k := \sum_{j=1}^k \frac{r^j}{j},$$
it is immediate that $(v_k^2)$ converges to a positive constant as $k$ goes to infinity, so that $\sum_{k=1}^{+\infty} v_k^2 = +\infty$.
A standard idea, in this situation, is to split the domain into two sub-domains, one where $r^{k-j}$ is small, and one where $1/j$ is small. For all $m \leq k$:
$$u_k = \sum_{j=1}^m \frac{r^{k-j}}{j} + \sum_{j=m+1}^k \frac{r^{k-j}}{j} 
\leq \sum_{j=1}^m r^{k-j} + \frac{1}{m+1} \sum_{j=m+1}^k r^{k-j} \leq \frac{r^{k-m}}{1-r} + \frac{1}{(m+1)(1-r)}.$$
Now, we need to choose a good value for $m$. Here, $m = \lfloor k/2 \rfloor$ is enough:
$$u_k \leq \frac{1}{1-r} \left( r^{k/2} + \frac{2}{k}\right).$$
From there, proving that $\sum_{k=1}^{+\infty} u_k^2 < +\infty$ is straightforward.
