Given the sequence $$a_1=a_2=1;\ a_ {n+2} = 3a_n + 2\sqrt{2a_n^2 + 2a_{n+1}^2}$$ prove that $a_n$ is an integer for all $n\in\mathbb N$.
Attempt
It is enough to show that $2a_n^2 + 2a_{n+1}^2$ is a perfect square. That means it's an even perfect square and so divisible by 4; thus $a_n^2+a_{n+1}^2=2k^2$ for some integer $k$. I think can solve this diophantine equation but I can't relate the solution to the original problem. Can anyone help?
$a_{n+2}\ =\ 3a_n+2\sqrt{2a_n^2+2a_{n+1}^2}$
$\implies\ \left(a_{n+2}-3a_n\right)^2\ =\ 8a_n^2+8a_{n+1}^2$
$\implies\ a_n^2-6a_{n+2}a_n-8a_{n+1}^2+a_{n+2}^2=0$
Treat this as a quadratic equation in $a_n$. The discriminant is
$\Delta_n\ =\ 36a_{n+2}^2+32a_{n+1}^2-4a_{n+2}^2 = 4\left(8a_{n+1}^2+8a_{n+2}^2\right)$
Thus
$a_n\ =\ \dfrac{6a_{n+2}-\sqrt{\Delta}}2\ (\because a_n<a_{n+2})$
$=\ 3a_{n+2}-2\sqrt{2a_{n+1}^2+2a_{n+2}^2}$
$\implies\ -a_n+3a_{n+1}+3_{a_n+2}\ =\ 3a_{n+1}+2\sqrt{2a_{n+1}^2+2a_{n+2}^2}=a_{n+3}$
Since $a_1=a_2=1$ and $a_3=7$ are integers, $a_4$ is an integer; by induction $a_n\in\mathbb Z$ for all $n\in\mathbb N$.