. Find all integers $n \geqslant 2$ for which the system:

$$
\left\{\begin{aligned}
x_{1}^{2}+x_{2}^{2}+50 & =16 x_{1}+12 x_{2} \\
x_{2}^{2}+x_{3}^{2}+50 & =16 x_{2}+12 x_{3} \\
& \vdots \\
x_{n-1}^{2}+x_{n}^{2}+50 & =16 x_{n-1}+12 x_{n} \\
x_{n}^{2}+x_{1}^{2}+50 & =16 x_{n}+12 x_{1}
\end{aligned}\right.
$$

admits at least one solution in integers.
Let $x_{n+1}=x_{1}$ so that the system can be written in the form $x_{i}^{2}+x_{i+1}^{2}+$ $50=16 x_{i}+x_{i+1}$ for all $i \in\{1, \ldots, n\}$. This latter equation is equivalent to the equality $\left(x_{i}-8\right)^{2}+$ $\left(x_{i+1}-6\right)^{2}=50$, which is much more manageable for this exercise, since by examining how 50 can be written as the sum of two squares, it implies that all pairs $\left(x_{i}, x_{i+1}\right)$ must be one of the following:

$$
\begin{aligned}
& (7,-1) \quad ; \quad(7,13) \quad ; \quad(9,-1) \quad ; \quad(9,13) \quad ; \quad(3,1) \text {; } \\
& (13,1) \text {; (13,11) ; (1,5) ; (1,7) ; (15,5) ; }(15,7)
\end{aligned}
$$

Furthermore, one of the previous pairs $(x, y)$ can only appear if $x$ (resp. $y$) is the second (resp. the first) of another pair. This eliminates the pairs $(7,-1),(9,-1),(9,13),(3,1)$, $(3,11),(13,11),(1,5),(15,5)$ and $(15,7)$, leaving only $(7,13),(13,1)$ and $(1,7)$ as candidates. Thus, if there is a solution, the $x_{i}$ must form a periodic sequence ..., $7,13,1,7,13,1, \ldots$ and this is obviously possible only if $n$ is a multiple of 3. Conversely, if $n$ is a multiple of 3, this periodic sequence is indeed a solution.