Consider $a_0=a_1=1$ and $a_k=2a_{k-1}+a_{k-2}$ for $k\ge2$. Similarly $b_0=0,b_1=1$ and $b_k=2b_{k-1}+b_{k-2}$ for $k\ge 2$.
I want to prove that for every natural $k$ the pair $(a_k,b_k)$ is an integer solution of the equation $a^2-2b^2=\pm 1$ where $a,b\in \mathbb Z$. Of course you can find other recursions for other indices (even/odd). This would be ok for me.
Now the idea is to prove it by induction. I tried, but I had some difficulties since by even $k$ we have the solution for $+1$ and for odd $k$ the one for $-1$ and I should prove also this by induction. However I cannot see how since the $a_k,b_k$ are too dependent on the others. Making computations you can see what I mean.
Another idea was to consider two distinct recursions: one for even values of $k$ and another one for odd $k$ and proving by induction the two recursions separately. However I cannot see these recursions. Anyone does?
Does anyone know how to do the induction here?
We can use the fact that
$$a_n=\frac{1}{2} \left(\left(1-\sqrt{2}\right)^n+\left(1+\sqrt{2}\right)^n\right) \qquad \text{and} \qquad b_n=-\frac{\left(1-\sqrt{2}\right)^n-\left(1+\sqrt{2}\right)^n}{2 \sqrt{2}}.$$
These expressions can be proved by induction (there are also well-known methods to derive the general term of a linear recursive relation. You can read about it for example in Wikipedia.)
Therefore, we have
$$a_n^2=\frac{1}{4}\left\{\left(1-\sqrt{2}\right)^{2 n}+\left(1+\sqrt{2}\right)^{2 n}+2\left(\left(1-\sqrt{2}\right) \left(1+\sqrt{2}\right)\right)^n\right\} $$
and
$$2b_n^2=\frac14\left\{\left(1-\sqrt{2}\right)^{2 n}+\left(1+\sqrt{2}\right)^{2 n}-2\left(\left(1-\sqrt{2}\right) \left(1+\sqrt{2}\right)\right)^n\right\} $$
so
$$a_n^2-2b_n^2=\frac14\left\{4\left(\left(1-\sqrt{2}\right) \left(1+\sqrt{2}\right)\right)^n\right\} =(-1)^n.$$
EDIT (a method to derive $a_n$): let us define
$$F(x):=\sum_{n\geq0}a_n\frac{x^n}{n!}.$$
Then clearly $F^{(n)}(0)=a_n$. Now,
$$F''(x)=\sum_{n\geq0}a_{n+2}\frac{x^n}{n!} =\sum_{n\geq0}a_{n}\frac{x^n}{n!}+2\sum_{n\geq0}a_{n+1}\frac{x^n}{n!} =\sum_{n\geq0}a_{n}\frac{x^n}{n!}+2\sum_{n\geq1}a_{n}\frac{x^{n-1}}{(n-1)!} =F(x)+2F'(x).$$
So $F$ is a function that satisfies the linear second order ODE
$$F''(x)-2F'(x)-F(x)=0$$
and the initial conditions $F(0)=1,F'(0)=1$. Solving the differential equation we obtain
$$F(x)=\frac{1}{2} \left(e^{\left(1-\sqrt{2}\right) x}+e^{\left(1+\sqrt{2}\right) x}\right),$$
so the general form of $a_n$ is achieved after $n$-fold differentiation.