5. Around a round table, $n-1$ schoolchildren are sitting ($n \geqslant 4$). The teacher has $n$ cards, on which the numbers $1, 2, 3, \ldots, n$ are written, each one time. He gave each schoolchild one card and kept one card for himself. For each pair of adjacent schoolchildren, the sum of the numbers on their cards was calculated and written on the board, then the sum of the numbers on the teacher's card and one of the schoolchildren's cards was also written on the board. For which $n$ could the $n$ numbers written on the board give different remainders when divided by $n$?
Answer: for even $n$

Solution. Since we are only interested in the remainders when divided by $n$, for convenience, we will replace the card with the number $n$ with a card with the number 0. Suppose there exists a suitable way to distribute the cards. We will number the students in a circle from 0 to $n-2$ (starting with the student whose number is added to the teacher's number) and denote by $a_{k}$ the number written on the card of the $k$-th student, and let the teacher's number be $a_{n-1}$. Then

$$
\sum_{k=0}^{n-1} a_{k}=\sum_{k=0}^{n-1} k=\frac{(n-1) n}{2}
$$

On the other hand, the sums

$$
a_{n-1}+a_{0}, \quad a_{0}+a_{1}, \quad a_{1}+a_{2}, \quad a_{2}+a_{3}, \ldots, \quad a_{n-3}+a_{n-2}, \quad a_{n-2}+a_{0}
$$

give different remainders when divided by $n+1$, so their remainders are the numbers $0,1, \ldots, n$, listed in some order. Therefore,

$$
\begin{aligned}
& \left(a_{n-1}+a_{0}\right)+\left(a_{0}+a_{1}\right)+\left(a_{1}+a_{2}\right)+\ldots+\left(a_{n-3}+a_{n-2}\right)+\left(a_{n-2}+a_{0}\right)= \\
& =\left(a_{0}-a_{n-1}\right)+2 \sum_{k=0}^{n-1} a_{k}=\left(a_{0}-a_{n-1}\right)+(n-1) n
\end{aligned}
$$

gives the same remainder when divided by $n$ as the sum $0+1+2+\ldots+(n-1)=\frac{1}{2}(n-1) n$. If $n-1$ is an even number, then $\frac{1}{2}(n-1) n$ is divisible by $n$, so the sum (*) must also be divisible by $n$. But in this case, the numbers $a_{0}$ and $a_{n-1}$ give the same remainder when divided by $n$, which is impossible. Therefore, $n$ is even. If $n=2 k$, then the numbers $a_{0}$ and $a_{n-1}$ must give the same remainder when divided by $k$.

We will present a card distribution that satisfies the condition for $n=2 k$. The teacher will keep the card with the number $k$, i.e., $a_{2 k-1}=k$, and will give the card with the number 0 to the student whose number will be added to $k$. The cards with numbers from 1 to $k-1$ will be distributed in ascending order, moving clockwise through every other student. Thus, $a_{0}=0, a_{2}=1, a_{4}=2, \ldots, a_{2 k-2}=k-1$. The cards with numbers from $k+1$ to $2 k-1$ will be distributed in ascending order, continuing to move clockwise through every other student. Thus, $a_{1}=k+1, a_{3}=k+2, a_{5}=k+3, \ldots, a_{2 k-3}=2 k-1$. An example of card distribution for $n=14$ and $k=7$ is shown in the figure.

![](https://cdn.mathpix.com/cropped/2024_05_06_e0197926f6acc0f95da5g-14.jpg?height=491&width=594&top_left_y=1616&top_left_x=731)

## 10-11 GRADE. FOURTH VARIANT