10.1. The sequences $\left\{x_{n}\right\},\left\{y_{n}\right\}$ are defined by the conditions $x_{1}=11, y_{1}=7, x_{n+1}=3 x_{n}+2 y_{n}$, $y_{n+1}=4 x_{n}+3 y_{n}, n \in \mathbb{N}$. Find the remainder of the division of the number $y_{1855}^{2018}-2 x_{1855}^{2018}$ by 2018.
Answer: 1825.

Solution. For all $n \in \mathbb{N}$, the numbers $x_{n}$ and $y_{n}$ are odd. Notice that

$$
2 x_{n+1}^{2}-y_{n+1}^{2}=2\left(3 x_{n}+2 y_{n}\right)^{2}-\left(4 x_{n}+3 y_{n}\right)^{2}=2 x_{n}^{2}-y_{n}^{2}
$$

Therefore, $2 x_{n}^{2}-y_{n}^{2}=\ldots=2 x_{1}^{2}-y_{1}^{2}=242-49=193$.

Let $p=1009$. This number is odd and prime, so the number $\left(y_{n}^{2}-2 x_{n}^{2}\right)^{p}=(-193)^{p}$ gives the same remainder when divided by $2 p$, as $y_{n}^{2 p}-2^{p} x_{n}^{2 p}$, since all binomial coefficients $C_{p}^{1}, \ldots, C_{p}^{p-1}$ are divisible by $p$. Moreover, by Fermat's little theorem, $2^{p}$ gives a remainder of 2 when divided by $2 p=2018$ (and therefore the remainders of the numbers $y_{n}^{2 p}-2^{p} x_{n}^{2 p}$ and $y_{n}^{2 p}-2 x_{n}^{2 p}$ are the same), and $(-193)^{p}$ gives a remainder of $2018-193=1825$ when divided by $2 p=2018$.