Contest problem: Show $\sum_{n = 1}^\infty \frac{n^2a_n}{(a_1+\cdots+a_n)^2}<\infty$ s.t., $a_i>0$, $\sum_{n = 1}^\infty \frac{1}{a_n}<\infty$ [closed]

The following is probably a math contest problem. I have been unable to locate the original source.

Suppose that $$\{a_i\}$$ is a sequence of positive real numbers and the series $$\displaystyle\sum_{n = 1}^\infty \frac{1}{a_n}$$ converges. Show that $$\sum_{n = 1}^\infty \frac{n^2a_n}{(a_1+\cdots+a_n)^2}$$

also converges.

Define at first some quantities to simplify the typing for the rest of the proof

• $$C^2:=\sum_{n=1}^{+\infty}\frac{1}{a_n}.$$
• $$A_n=a_1+\dotso+a_n.$$

Moreover let $$P_N:=\sum_{n=1}^N\frac{n^2a_n}{(a_1+\dotso+a_n)^2}.$$ Clearly $P_{N+1}>P_N$, that is, $P_N$ is an increasing sequence. If we can prove that it is also bounded above, we are done with the proof. To reach this goal, notice that $$\begin{split}P_N<&\frac{1}{a_1}+\sum_{n=2}^N\frac{n^2(A_n-A_{n-1})}{A_nA_{n-1}}\\ =&\frac{1}{a_1}+\sum_{n=2}^N\left(\frac{n^2}{A_{n-1}}-\frac{n^2}{A_n}\right).\end{split}\tag{1}$$ Since $(n+1)^2-n^2=2n+1<5n$ for every $n\in\mathbb N$, one gets from $(1)$ that $$\begin{split}P_N<&\frac{1}{a_1}+\frac{4}{a_1}+\sum_{n=2}^{N-1}\frac{2n+1}{A_n}-\frac{N^2}{A_N}\\ <&\frac{5}{a_1}+\frac{5}{A_2}+\dots+\frac{2N-1}{A_{N-1}}-\frac{N^2}{A_N}\\<&5\left(\frac{1}{A_1}+\frac{2}{A_2}+\dots+\frac{N}{A_N}\right).\end{split}\tag{2}$$ By Cauchy Schwarz we also have $$\sqrt{\left(\frac{1}{a_1}+\dots+\frac{1}{a_N}\right)}\sqrt{\left(\frac{a_1}{A_1^2}+\dots+\frac{N^2a_N}{A_N^2}\right)}\geq\left(\frac{1}{A_1}+\frac{2}{A_2}+\dots+\frac{N}{A_N}\right),\tag{3}$$ from which, following $(2)$, it turns out that $$P_N<5C\sqrt{P_N}.$$ It is then clear that the sequence $P_N$ is bounded from above, since for any $N\in\mathbb N$, we have estabilished $$P_N<25C^2.$$ Therefore, since $P_N$ is also increasing as observed at the beginning, we can conclude that $P_N$ converges. This concludes the proof.