Problem 3. Consider the sequence

$$
y_{1}=y_{2}=1, y_{n+2}=(4 k-5) y_{n+1}-y_{n}+4-2 k, n \geq 1
$$

Find all integers $k$ such that any term of the sequence is a perfect square.

Sava Grozdev, Svetlozar Doychev
3. Let $k$ have the given property. We have that $y_{3}=2 k-2=4 a^{2}(a \geq 0)$, i.e., $k=2 a^{2}+1$, Further $y_{4}=8 k^{2}-20 k+13$ and $y_{5}=32 k^{3}-120 k^{2}+148 k-$ $59=256 a^{6}-96 a^{4}+8 a^{2}+1$.

If $a=0$ we get that $k=1$ and the given sequence is $1,1,0,1,1,0, \ldots$ Hence $k=1$ is a solution of the problem.

Let $a>0$. Its is easy to check that

$$
\left(16 a^{3}-3 a\right)^{2} \geq y_{5}=256 a^{6}-96 a^{4}+8 a^{2}+1>\left(16 a^{3}-3 a-1\right)^{2}
$$

Since $y_{5}$ is a perfect square, the first inequality must be equality, i.e., $a=1$ and then $k=3$.

We shall prove that $k=3$ is a solution of the problem. In this case the sequence is defined by $y_{1}=y_{2}=1$ and $y_{n+2}=7 y_{n+1}-y_{n}-2$ for $n \geq 1$. Since $y_{3}=2^{2}, y_{4}=5^{2}$ and $y_{5}=13^{2}$, it is natural to conjecture that $y_{n}=u_{2 n-3}^{2}$ for $n \geq 2$ where $\left\{u_{n}\right\}_{n=1}^{\infty}$ is the Fibonacci sequence: $u_{1}=u_{2}=1$ and $u_{n+2}=$ $u_{n+1}+u_{n}$ for $n \geq 1$. To prove this, we first note that $u_{n+2}=3 u_{n}-u_{n-2}$ and $u_{n+2} u_{n-2}-u_{n}^{2}=1$ for any odd $n \geq 3$. It follows that $\left(u_{n+2}+u_{n-2}\right)^{2}=9 u_{n}^{2}$ and thus

$$
u_{n+2}^{2}=9 u_{n}^{2}-u_{n-2}^{2}-2 u_{n-2} u_{n+2}=7 u_{n}^{2}-u_{n-2}^{2}-2
$$

Hence $y_{n}=u_{2 n-3}^{2}$ for $n \geq 2$.