8.2. How many solutions does the equation $(2 x+y)^{2}=2017+x^{2}$ have in integers $x, y$?
Answer: four solutions. Solution. Since 2017 is a prime number, from the factorization $2017=(3 x+y)(x+y)$, the possible systems are:

$$
\left\{\begin{array}{l}
3 x+y=2017 \\
x+y=1
\end{array} ;\left\{\begin{array}{l}
3 x+y=1 \\
x+y=2017
\end{array} ;\left\{\begin{array}{l}
3 x+y=-2017 \\
x+y=-1
\end{array} ;\left\{\begin{array}{l}
3 x+y=-1 \\
x+y=-2017
\end{array}\right.\right.\right.\right.
$$

Solving each of these systems, we get four solutions: (1008;-1007), (-1008;3025), (-1008;1007), (1008; 3025).