2. Let $n \in \mathbb{N}^{*}$. Find $x \in \mathbb{Z}$ for which $\frac{x^{5 n}+2 x^{2 n}-x^{n}+1}{x^{5 n}+x^{n}-1} \in \mathbb{Z}$.

Carmen and Viorel Botea, Brăila
Solution. Let $x^{n}=y \Rightarrow$

$\Rightarrow \frac{y^{5}+2 y^{2}-y+1}{y^{5}+y-1}=\frac{\left(y^{5}+y^{2}\right)+\left(y^{2}-y+1\right)}{\left(y^{5}+y^{2}\right)-\left(y^{2}-y+1\right)}=\frac{y^{2}(y+1)\left(y^{2}-y+1\right)+\left(y^{2}-y+1\right)}{y^{2}(y+1)\left(y^{2}-y+1\right)-\left(y^{2}-y+1\right)}=\frac{y^{3}+y^{2}+1}{y^{3}+y^{2}-1} \in \mathbb{Z} \Rightarrow$

$\Rightarrow\{\left.\begin{array}{l}y^{3}+y^{2}-1 \mid y^{3}+y^{2}+1 \\ y^{3}+y^{2}-1 \mid y^{3}+y^{2}-1\end{array} \Rightarrow \underbrace{y^{3}+y^{2}}_{\text {even }}-1 \right\rvert\, 2 \Rightarrow y^{3}+y^{2}-1= \pm 1 \Rightarrow$

$\Rightarrow$ i) $y^{3}+y^{2}-1=-1 \Rightarrow y=0, y=-1 \Rightarrow x=0, x=-1, n$ odd

ii) $y^{3}+y^{2}-1=1 \Rightarrow y=1 \Rightarrow x= \pm 1, n$ even and $x=1, n$ odd,

thus $x \in\{+1,0,1\},(\forall n) \in \mathbb{N}$.