
1. Some objects are in each of four rooms. Let $n \geqslant 2$ be an integer. We move one $n$-th of objects from the first room to the second one. Then we move one $n$-th of (the new number of) objects from the second room to the third one. Then we move similarly objects from the third room to the fourth one and from the fourth room to the first one. (We move the whole units of objects only.) Finally the same number of the objects is in every room. Find the minimum possible number of the objects in the second room. For which $n$ does the minimum come?

(Vojtech Bálint, Michal Rolínek)


Solution. Let us compute backwards. Firstly we find the number of the objects in two rooms before the move. Let $a$ and $b$ be number of the objects in the rooms $A$ and $B$ before the move. This number after the move we denote by $a^{\prime}$ and $b^{\prime}$. By the conditions

$$
a^{\prime}=\frac{n-1}{n} a, \quad b^{\prime}=b+\frac{1}{n} a
$$

holds. From the first equation and an identity $a+b=a^{\prime}+b^{\prime}$ we obtain

$$
a=\frac{n}{n-1} a^{\prime}, \quad b=b^{\prime}-\frac{1}{n-1} a^{\prime}
$$

Now let $M$ be the final number of the objects in every room after the fourth move. By this identity we can compute the initial number of objects in every room in terms of $M$ and $n$ :

Finally: $\quad M \quad M \quad M \quad M \quad M$

| before $4 \rightarrow 1:$ | $\frac{n-2}{n-1} M$, | $M$, | $M$, | $\frac{n}{n-1} M ;$ |
| :--- | ---: | ---: | ---: | ---: |
| before $3 \rightarrow 4:$ | $\frac{n-2}{n-1} M$, | $M$, | $\frac{n}{n-1} M$, | $M ;$ |
| before $2 \rightarrow 3:$ | $\frac{n-2}{n-1} M$, | $\frac{n}{n-1} M$, | $M$, | $M ;$ |
| before $1 \rightarrow 2:$ | $\frac{n(n-2)}{(n-1)^{2}} M$, | $\frac{(n-1)^{2}+1}{(n-1)^{2}} M$, | $M$, | $M$. |

Since the number of objects in the first room was positive, $n \geqslant 3$ holds. Now we can easily find the minimum of

$$
V_{2}=\frac{(n-1)^{2}+1}{(n-1)^{2}} M
$$

The difference between numerator and denominator is 1 , so the fraction is irreducible. Since $V_{2}$ is integer it must be $M=k(n-1)^{2}$ for proper $k$, therefore $V_{2}=k\left((n-1)^{2}+1\right)$. For $n \geqslant 3$ we can estimate $(n-1)^{2}+1 \geqslant 5$, so $V_{2} \geqslant 5$ too. Using $n=3, k=1$ and $M=4$ we obtain $V_{2}=5$ and we can easily check that the quadruple $(3,5,4,4)$ satisfies the problem: it transforms to quadruple $(2,6,4,4)$, then $(2,4,6,4)$, after that $(2,4,4,6)$ and finally $(4,4,4,4)$. So the minimal numbers of objects in the second room is 5 and we can obtain it only for $n=3$ because for $n \geqslant 4$ is $V_{2} \geqslant 3^{2}+1=10$.
