Problem 3. On a board, the numbers $1, 2, 3, \ldots, 27$ are written. One step means erasing three numbers $a, b, c$ from the board and writing in their place the number $a+b+c+n$, where $n$ is a fixed non-zero natural number. Determine the natural number $n$ knowing that, after 13 steps, the number $n^2$ is written on the board.
## Solution.

First, we note that after each step, two numbers in fact disappear from the board, so after 13 steps, 26 numbers disappear, leaving only one number.

$1 p$

After each step, the sum of the numbers increases by n, so after 13 steps, the sum on the board (i.e., the number left on the board) is $1+2+\cdots+27+13 n=\frac{27 \cdot 28}{2}+13 n=378+13 n \ldots \ldots \ldots \ldots \ldots 3$ p

From $378+13 n=n^{2}$, we get $378=n(n-13)$. The divisors of 378 are $D_{378}=\{1,2,3,6,7,9,14,18,21,27,42,54,63,126,189,378\}$, among which $n=27$ satisfies the property stated in the problem.

$3 p$