1.1. The sequence $\left\{x_{n}\right\}$ is defined by the conditions $x_{1}=20, x_{2}=17, x_{n+1}=x_{n}-x_{n-1}(n \geqslant 2)$. Find $x_{2018}$.
Answer: 17.

Solution: From the condition, it follows that $x_{n+3}=x_{n+2}-x_{n+1}=x_{n+1}-x_{n}-x_{n+1}=-x_{n}$, therefore $x_{n+6}=$ $-x_{n+3}=x_{n}$, i.e., the sequence is periodic with a period of 6. Since $2018=6 \cdot 336+2$, we get $x_{2018}=x_{2}=17$.