3. For which $n$ is it possible to fill an $n \times n$ table with numbers from 1 to $n^{2}$ so that the sum of the numbers in each row and each column is divisible by seven?
3. The sum of all numbers in the table is $\frac{1}{2} n^{2}\left(n^{2}+1\right)$. For this sum to be divisible by seven, either $n$ itself or the number $n^{2}+1$ must be divisible by seven. However, it is easy to verify that the number $n^{2}+1$ is not a multiple of seven for any natural number $n$. (This, of course, only needs to be verified for $n$ equal to all possible remainders $0,1, \ldots, 6$ when divided by seven.)

On the other hand, if $n$ is a multiple of seven, the table can indeed be filled in such a way that the requirements of the problem are met. It suffices to write the numbers from 1 to $n^{2}$ in ascending order row by row. In the $i$-th row $(1 \leqq i \leqq n)$, the numbers will be

$$
7(i-1)+1,7(i-1)+2, \ldots, 7(i-1)+n
$$

whose sum is divisible by seven, since the sum $1+2+\ldots+n=\frac{1}{2} n(n+1)$ is clearly a multiple of seven.

Similarly, in the $j$-th column $(1 \leqq j \leqq n)$, the numbers will be

$$
j, n+j, \ldots,(n-1) n+j \text {, }
$$

whose sum is $n j+n(1+2+\ldots+n-1)$, which is a multiple of the number $n$, and thus also of seven.

For a complete solution, award 6 points. For finding the necessary condition $7 \mid n$, award 3 points; for verifying that for these $n$ the table can be filled, award 3 points. In detail: 1 point for observing that the sum of the numbers in the table must be divisible by 7, 1 point for calculating this sum as $\frac{1}{2} n^{2}\left(n^{2}+1\right)$, 1 point for a correct proof that $7 \mid n$, 1 point for describing a suitable filling, 1 point for proving that the rows have a sum divisible by 7, 1 point for proving that the columns have a sum divisible by 7.

For partial points: 1 point for hypothesizing that the answer is $7 \mid n$. For proving that it cannot be done for finitely many $n$, or for finding a filling for $n=7$ (and nothing more), do not award any points.