Problem 4. Consider a natural number $n \geq 2$ and an $n \times n$ square (see the adjacent figure). The main diagonal of this square is formed by the shaded fields. We fill the fields below the main diagonal with zeros, and in the rest of the fields (including the shaded ones) we write non-zero natural numbers. After filling all the fields, we calculate the sum of the numbers in each row and each column, thus obtaining $2n$ sums. The square is called lucky if the values of these $2n$ sums are equal, in some order, to the numbers $1, 2, \ldots, 2n$.

a) Show that for $n=5$, there is no lucky square.

b) If $n=4$, determine the largest natural number that can appear in the completion of a lucky square.

![](https://cdn.mathpix.com/cropped/2024_06_07_e6c66b94c0630c0832b8g-2.jpg?height=533&width=526&top_left_y=590&top_left_x=802)
Solution. a) Suppose there exists a lucky square $5 \times 5$. The sum of all sums will be $1+$ $2+\cdots+10=55$. The sum of the row sums is equal to the sum of the column sums, so the sum of all sums is even. But 55 is odd, hence there is no lucky square $5 \times 5$.

b) Suppose a cell is occupied by a number $m \geq 7$, this cell cannot be on the first or second row or column, otherwise the sum would be at least $m+2 \geq 9>8$. And in the rest of the cells are zeros, so $m \leq 6$. ........................................................................................................

A lucky square for $m=6$ is shown in the adjacent figure. Therefore, the largest natural number that can appear in the completion of a lucky square is 6.

| 1 | 1 | 1 | 3 |
| :--- | :--- | :--- | :--- |
| 2 | 1 | 1 | 0 |
| 1 | 6 | 0 | 0 |
| 1 | 0 | 0 | 0 |