# Problem 4.

All numbers $1,2,3, \ldots, n^{2}$ are arranged in the form of an $n \times n$ square table. Find all $n$ for which the sum of the numbers in each subsequent row of such a table is 1 more than the sum of the numbers in the previous row.
# Solution.

First, we prove that the number $n$ cannot be even. We reason by contradiction. Suppose $n=2k (k \in \mathbb{N})$ and $S$ is the sum of the numbers in the first row. We calculate the sum of all numbers in the table in two ways. The first way is by adding all numbers from 1 to $4k^2$ inclusive, and the second way is by summing the numbers row by row. We obtain the following equality:

$$
1+2+\ldots+4k^2 = S + (S+1) + \ldots + (S+2k-1)
$$

which simplifies to

$$
(1+4k^2) \cdot 2k^2 = 2kS + (2k-1)k
$$

from which it follows that $8k^4 = k(2S-1)$ and $8k^3 = 2S-1$ - a contradiction. Therefore, the number $n$ must be odd.

For any odd number $n$, starting from 3, we will specify the required arrangement of numbers in the $n \times n$ table. The example below is given for $n=5$. For larger values, the "snake" arrangement is done similarly.

| 1 | 10 | 11 | 20 | 21 | $\Sigma_{1}=63$ |
| :---: | :---: | :---: | :---: | :---: | :---: |
| 2 | 9 | 12 | 19 | 22 | $\Sigma_{2}=6$ |
| 3 | 8 | 13 | 18 | 23 | $\Sigma_{3}=65$ |
| 4 | 7 | 14 | 16 | 24 | $\Sigma_{4}=$ |
| 5 | 6 | 15 | 16 | 25 | $\Sigma_{5}$ |

Answer: all odd natural numbers $n$.