2. The sequence $\left(a_{n}\right)_{n \geqslant 1}$ is defined as

$$
a_{1}=20, \quad a_{2}=30, \quad a_{n+2}=3 a_{n+1}-a_{n} \quad \text { for } n \geqslant 1 .
$$

Determine all natural $n$ for which $1+5 a_{n} a_{n+1}$ is a perfect square.

(Bulgarian)
2. From the recurrence relation, we get $5 x_{n} x_{n+1} - 5 x_{n-1} x_{n} = 5 x_{n} (3 x_{n} - 2 x_{n-1}) = (4 x_{n} - x_{n-1})^2 - (x_{n-1} + x_{n})^2 = (x_{n} + x_{n+1})^2 - (x_{n-1} + x_{n})^2$. From this, it follows that

$$
5 x_{n} x_{n+1} - (x_{n} + x_{n+1})^2 = 5 x_{n-1} x_{n} - (x_{n-1} + x_{n})^2 = \cdots = 5 x_{1} x_{2} - (x_{1} + x_{2})^2 = 500
$$

Therefore, $1 + 5 x_{n} x_{n+1} = (x_{n} + x_{n+1})^2 + 501$ is between $(x_{n} + x_{n+1})^2$ and $(x_{n} + x_{n+1} + 1)^2$ if $x_{n} + x_{n+1} > 250$, i.e., for $n \geqslant 4$ since $x_{3} = 70, x_{4} = 180, x_{5} = 470$, so it is not a perfect square. By checking for $n=1,2,3$, we find that $1 + 5 x_{n} x_{n+1}$ is a perfect square only for $n=3: 1 + 5 \cdot 70 \cdot 180 = 250^2 + 501 = 251^2$.