
4. Find the number of 10 -tuples $\left(a_{1}, a_{2}, \ldots, a_{10}\right)$ of integers such that $\left|a_{1}\right| \leq 1$ and

$$
a_{1}^{2}+a_{2}^{2}+a_{3}^{2}+\cdots+a_{10}^{2}-a_{1} a_{2}-a_{2} a_{3}-a_{3} a_{4}-\cdots-a_{9} a_{10}-a_{10} a_{1}=2
$$


Solution. Let $a_{11}=a_{1}$. Multiplying the given equation by 2 we get

$$
\left(a_{1}-a_{2}\right)^{2}+\left(a_{2}-a_{3}\right)^{2}+\cdots\left(a_{10}-a_{1}\right)^{2}=4
$$

Note that if $a_{i}-a_{i+1}= \pm 2$ for some $i=1, \ldots, 10$, then $a_{j}-a_{j+1}=0$ for all $j \neq i$ which contradicts the equality $\sum_{i=1}^{10}\left(a_{i}-a_{i+1}\right)=0$. Therefore $a_{i}-a_{i+1}=1$ for exactly two values of $i$ in $\{1,2, \ldots, 10\}, a_{i}-a_{i+1}=-1$ for two other values of $i$ and $a_{i}-a_{i+1}=0$ for all other values of $i$. There are $\binom{10}{2} \times\binom{ 8}{2}=45 \times 28$ possible ways of choosing these values. Note that $a_{1}=-1,0$ or 1 , so in total there are $3 \times 45 \times 28$ possible integer solutions to the given equation.
