For every positive integer $1 \leqq k \leqq 100$, let $a_{k}$ denote the sum $\frac{1}{k}+\frac{1}{k+1}+\ldots+\frac{1}{100}$. Calculate the value of

$$
a_{1}+a_{1}^{2}+a_{2}^{2}+\ldots+a_{100}^{2}
$$

the sum.
Let's perform the squaring. Then we will add the terms by grouping them appropriately.

The term $1 / k^{2}$ will appear exactly $k$ times: in $a_{1}^{2}$, $a_{2}^{2}$, $\ldots, a_{k}^{2}$. The sum of these is $k \cdot 1 / k^{2}=1 / k$; then, for all $k$, $\frac{1}{1}+\frac{1}{2}+\ldots+\frac{1}{100}=a_{1}$.

Now let's consider the "mixed" terms. Let $j<i$; then $2 \cdot \frac{1}{j \cdot i}$ appears in all $a_{k}^{2}$ where $k \leq j$. Thus, the sum of these terms is $j \cdot \frac{2}{j \cdot i}=\frac{2}{i}$. For a given $i$, there are $i-1$ numbers $j$ such that $j<i$, so the sum of all possible $\frac{2}{j \cdot i}$ terms for a fixed $i$ is $(i-1) \cdot \frac{2}{i}=2-\frac{2}{i}$. Summing over all $i$,

$$
\left(2-\frac{2}{1}\right)+\left(2-\frac{2}{2}\right)+\ldots+\left(2-\frac{2}{100}\right)=200-2 \cdot\left(\frac{1}{1}+\frac{1}{2}+\ldots+\frac{1}{100}\right)=200-2 \cdot a_{1}
$$

is obtained.

Based on this, $a_{1}+a_{1}^{2}+a_{2}^{2}+\ldots+a_{100}^{2}=a_{1}+a_{1}+200-2 a_{1}=200$.

Tamas Hajba (Győr, Révai M. Gymnasium, 3rd grade)