Prove $a_{n+2}=3a_n+2\sqrt{2a_n^2+2a_{n+1}^2}$ is an integer 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: $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$.
A: Let $b_n=\sqrt{2a_n^2+2a_{n+1}^2}$. Show that $$b_{n+1}=3b_n+4a_{n}.$$
A: We have that:
$$a_{n+2}-3a_n=2\sqrt{2a_n^2+2{a_{n+1}}^2}\Rightarrow (a_{n+2}-3a_n)^2=(2\sqrt{2a_n^2+2{a_{n+1}}^2})^2\Rightarrow\\ {a_{n+2}}^2-6a_na_{n+2}+9a_n^2=8a_n^2+8{a_{n+1}}^2\Rightarrow {a_{n+2}}^2+{a_{n+1}}^2=-a_n^2+6a_na_{n+2}+9{a_{n+1}}^2\Rightarrow \\{a_{n+2}}^2+{a_{n+1}}^2=-a_n^2+6a_n(3a_n+2\sqrt{2a_n^2+2{a_{n+1}}^2})+9{a_{n+1}}^2\Rightarrow\\ {a_{n+2}}^2+{a_{n+1}}^2=17a_n^2+9{a_{n+1}}^2+12a_n\sqrt{2a_n^2+2{a_{n+1}}^2}\Rightarrow\\ 2({a_{n+2}}^2+{a_{n+1}}^2)={(4a_n)}^2+\left(3\sqrt{2a_n^2+2{a_{n+1}}^2}\right)^2+2\cdot (4a_n)\cdot \left(3\sqrt{2a_n^2+2{a_{n+1}}^2}\right)\Rightarrow\\ 2({a_{n+2}}^2+{a_{n+1}}^2)=\left(4a_n+3\sqrt{2a_n^2+2{a_{n+1}}^2}\right)^2\ (1)$$
Now we will prove the claim with induction.
It is a matter of a few calculations to verify that $a_3$ and $a_4$ are integers. 
Now we suppose that $a_n$ is an integer for every $4\leq n\leq k$. Then we immediately get that $\sqrt{2{a_{k-2}}^2+2{a_{k-1}}^2}$ is an integer as the difference of the integers $a_k$ and $3a_{k-2}$. From $(1)$ it follows that $\sqrt{2{a_{k-1}}^2+2{a_k}^2}$ is an integer too. 
Hence $a_{k+1}=3a_{k-1}+\sqrt{2{a_{k-1}}^2+2{a_k}^2}\in \mathbb Z$ as a sum of integers and the inductive proof is complete. Thus we are done. 
A: Will Jagy is right ... first port of call ... calculate the first few values $a_3=7$,$a_4=23$,$a_5=89$,$a_6=329$,$a_7=1231$.... I wrote a little c# project to this for me. Now google integer sequences & go to "The On-Line Encyclopedia of Integer Sequences". Put the values $1,1,7,23,89,319,1231,$ & hit search ... bingo ... it is sequence 217233, Expansion of $(1-2x+x^2)/(1-3x-3x^2+x^3)$. So we now know the solution ... we just need to prove it ... the denominator gives the equivalent recurrence relation $a_{n+3}=3a_{n+2}+3a_{n+1}-a_n$, the numerator is dictated by the initial conditions ... there is still some work to do to complete this answer but this gives a good start.   
