Solve the following equation:

$$
x^{2}+(x+1)^{2}+\ldots+(x+n)^{2}=(x+n+1)^{2}+(x+n+2)^{2}+\ldots+(x+2 n)^{2},
$$

where $n$ is a natural number.
By breaking down both sides of the equation into terms and writing these terms appropriately one under the other, we obtain

$$
\begin{aligned}
& \left.x^{2}+x^{2}+2 x \cdot 1+1^{2}+\right) \quad\left(\quad x^{2}+2 x \cdot n+2 x \cdot 1+n^{2}+2 n \cdot 1+1^{2}+\right. \\
& +x^{2}+2 x \cdot 2+2^{2}+\quad \mid+x^{2}+2 x \cdot n+2 x \cdot 2+n^{2}+2 n \cdot 2+2^{2}+
\end{aligned}
$$

![](https://cdn.mathpix.com/cropped/2024_05_02_4d76075441e7d5c8ab45g-1.jpg?height=106&width=1060&top_left_y=295&top_left_x=542)

$$
\begin{aligned}
& \left.+x^{2}+2 x \cdot n+n^{2}\right) \quad\left(+x^{2}+2 x \cdot n+2 x \cdot n+n^{2}+2 n \cdot n+n^{2}\right.
\end{aligned}
$$

The three columns on the left side are identical to the first, third, and last columns on the right side, respectively. Therefore, our equation is

$$
x^{2}=n \cdot 2 x n+n \cdot n^{2}+2 n(1+2+\ldots+n)=2 n^{2} x+n^{3}+n^{2}(n+1)
$$

which simplifies to

$$
x^{2}-2 n^{2} x-n^{2}(2 n+1)=0
$$

from which

$$
x_{1,2}=\frac{2 n^{2} \pm \sqrt{4 n^{4}+4 n^{2}(2 n+1)}}{2}=n^{2} \pm n \sqrt{n^{2}+2 n+1}=n^{2} \pm n(n+1)
$$

thus

$$
x_{1}=2 n^{2}+n=n(2 n+1), \quad x_{2}=-n, \quad \text { where } \quad n=1,2, \ldots
$$

Miklós Csapody (Bp. VIII., Piarist g. I. o.t.)

Remark: By solving this sequence of equations, we essentially answered the following question: "Which are those consecutive integers whose sum of squares is equal to the sum of squares of the next consecutive integers starting from a negative integer \(-n\) up to 0, and then from 0 to the next \(n\) integers." However, the root \(x_{1}=n(2 n+1)\) is more interesting and meaningful, as it states that for every positive integer of the form \(n(2 n+1)\), the sum of squares of the next \(n+1\) consecutive integers starting from \(n(2 n+1)\) is equal to the sum of squares of the next \(n\) consecutive integers. For example, when \(n=1\), \(3^{2}+4^{2}=5^{2}\); when \(n=2\), \(10^{2}+11^{2}+12^{2}=13^{2}+14^{2}\); when \(n=3\), \(21^{2}+22^{2}+23^{2}+24^{2}=25^{2}+26^{2}+27^{2}\), and so on.

![](https://cdn.mathpix.com/cropped/2024_05_02_4d76075441e7d5c8ab45g-1.jpg?height=43&width=1786&top_left_y=1236&top_left_x=164)