TITLE: show that $a_{n}=\frac{1}{4}[(1+\sqrt{2})^{2n+1}+(1-\sqrt{2})^{2n+1}+2](n>1)$ not have square numbers
QUESTION [9 upvotes]: Show that the sequence
  $$a_{n}=\dfrac{1}{4}[(1+\sqrt{2})^{2n+1}+(1-\sqrt{2})^{2n+1}+2]\qquad (n>1)$$
  doesn't contain a perfect square.

I think this problem is interesting, and my idea:
we can find $A$, $B$ and $C$ constants $$a_{n+1}=Aa_{n}+Ba_{n-1}+C$$
Thank you

REPLY [2 votes]: This is no complete solution, but may help bring $a_n$ somewhat incontext with "nearby" squares.
One readily checks that
$$a_0=1,\quad a_1=4, \quad a_n=6a_{n-1}-a_{n-2}+2.$$
Define the sequence $(b_n)_n$  by
$$b_0 = 1, \quad b_1=1,\quad b_n=2b_{n-1}+b_{n-2}-1,$$
which amounts to
$$b_n=\frac14\left((1+\sqrt2)^n+(1-\sqrt 2)^n+2\right) $$
Then $a_n=b_{2n+1}$.
We observe that $b_{4n}$ and $b_{4n+2}-1$ are squares for all $n$.
In fact, from $(1+\sqrt 2)(1-\sqrt 2)=-1$ we see that 
$$ \left(\frac12\left((1+\sqrt2)^{k}+(1-\sqrt 2)^{k}\right)\right)^2=\frac14\left((1+\sqrt2)^{2k}+(1-\sqrt2)^{2k}+2(-1)^k\right),$$
that is $b_{4m}=(2b_{2m}-1)^2$ and $b_{4m+2}=(2b_{2m+1}-1)^2+1$
Now if $n=2m$ is even, we obtain
$$ b_{4m+2}=2b_{2n+1}+b_{4m}-1$$
i.e. 
$$ (2b_{2m+1}-1)^2+1=2a_n+(2b_{2m}-1)^2-1$$
or $$a_n-1 = 2(b_{2m+1}+b_{2m}-1)(b_{2m+1}-b_{2m}) = 2(b_{2m+2}-b_{2m+1})(b_{2m+1}-b_{2m})=2c_{2m+1}c_{2m},$$
where
$$c_0=0,\quad c_1=1,\quad c_n=2c_{n-1}+c_{n-2}. $$
If $n$ is odd, we get a similar result with $a_n$ instead of $a_n-1$.