I asked an earlier question on when $32x+32$ is a square number (here) and I got a very clear answer.
Now I am looking to solve for which $x$ the equation $8x^2-4$ results in a square number. When I am trying to solve it I get: $y^2=4(2x^2-1)$ so if we put $y=2w$ then $2x^2-1 = w^2$ and therefore $x=\sqrt{\frac{w^2+1}{2}}$ which is correct.
Only now I need to check when $\frac{w^2-1}{2}$ is a square which goes on recursively. I am looking for Integer solutions for $x$ and $w$. How can I solve this?
developing it ..
$a(3)=6a(2)-a(1)$ coeffecients of $6^n$ are: $1,-1$
$a(4)=6^2a(2)-6a(1)-a(2)$ coeffecients: $1,-1,-1$
$a(5)=6^3a(2)-6^2a(1)-6a(2)-6a(2)+a(1)$ coeffecients: $1,-1,-2,1$
$a(6)=6^4a(2)-6^3a(1)-3*6^2a(2)+2*6a(1)+a(2)$ coeffecients: $1,-1,-3,2,1$
in general:
$coeff(a(n))=\{coeff(a(n-1)),0,0\}-\{0,0,coeff(a(n-2))\}$
binary analysis...
$11100000000$
$00110000000$ $k=0$
$00111000000$ $k=1$
$00111000000$
$00001100000$ $k=2$
$00111000000$
$00001100000$
$00001110000$ $k=3$
$00111000000$
$00001100000$
$00001110000$
$00000011000$ $k=4$
$00111000000$
$00001100000$
$00001110000$
$00000011000$
$00000011100$ $k=5$
first bit: 1
second bit: 1
third bit: 2+k
fourth bit: 1+k
fifth bit: 1+2+3(k-2)
sixth bit: 1+2+2(k-3)
seventh bit:1+2+3(k-4)
eighth bit: 1+2+2(k-5)
general sequence of coeffecients is :$\{1,-1,-2-n,1+n,1+2+3(k-l),-1-2-2(k-l-1)..\},l<k$
final formula:
$a(3)=6a(2)-a(1)$
$a(4)=6^2a(2)-6a(1)-a(2)$
$a(4+(k=1))=1*6^3a(2)-1*6^2a(1)-2*6^1a(2)+1*6^0a(1)$
$a(4+(k=2))=1*6^4a(2)-1*6^3a(1)-3*6^2a(2)+2*6^1a(1)-1a(2)$
...