TITLE: Find all integer solutions for the equation $|5x^2 - y^2| = 4$
QUESTION [20 upvotes]: In a paper that I wrote as an undergraduate student, I conjectured that the only integer solutions to the equation
$$|5x^2 - y^2| = 4$$
occur when $x$ is a Fibonacci number and $y$ is a Lucas number. I was able to prove that when $x$ was a Fibonacci number there existed a Lucas number $y$ such that $|5x^2 - y^2| = 4$. This is easily shown with Cassini's Identity $$F_{n-1}F_{n+1} - F_{n}^2 = (-1)^n$$
The challenge is this ... prove (or disprove) that these are the ONLY solutions.
By the way, this is how I generated the Diophantine equation.
$$F_{n-1}F_{n+1} - F_{n}^2 = (-1)^n$$
$$F_{n-1}(F_{n}+F_{n-1}) - F_{n}^2 = (-1)^n$$
$$F_n^2 - F_{n-1}F_n-F_{n-1}^2+(-1)^n=0$$
because $F_n \gt \frac{F_{n-1}}{2}$
$$F_n=\frac{F_{n-1} + \sqrt{F_{n-1}^2-4((-1)^n-F_{n-1}^2)}}{2}=\frac{F_{n-1} + \sqrt{5F_{n-1}^2+4((-1)^{n+1})}}{2}$$
Letting $y= \pm \sqrt{5F_{n-1}^2+4((-1)^{n+1})}$ and $x=F_{n-1}$ we have
$$y= \pm \sqrt{5x^2+4((-1)^{n+1})}$$
$$y^2= 5x^2 \pm 4$$
$$|5x^2 - y^2| = 4$$

REPLY [2 votes]: If no enough basic knowledge, we can also directly caculate.
If $(x_0,y_0),(x_1,y_1)$ solved $x^2-5y^2 = \pm 4$
$ 1 = \frac{x_0^2-5y_0^2}{x_1^2-5y_1^2}$
$ = \frac{x_0+\sqrt{5}y_0}{x_1+\sqrt{5}y_1} \cdot \frac{x_0-\sqrt{5}y_0}{x_1-\sqrt{5}y_1} $
$ = \frac{(x_0+\sqrt{5}y_0)(x_1-\sqrt{5}y_1)}{x_1^2-5y_1^2} \cdot \frac{(x_0-\sqrt{5}y_0)(x_1+\sqrt{5}y_1)}{x_1^2-5y_1^2} $
$ = \frac{(x_0x_1-5y_0y_1)+\sqrt{5}(y_0x_1-x_0y_1)}{4} \cdot \frac{(x_0x_1-5y_0y_1)-\sqrt{5}(y_0x_1-x_0y_1)}{4} $
$ = (\frac{x_0x_1-5y_0y_1}{4})^2+\sqrt{5}(\frac{y_0x_1-x_0y_1}{4})^2$
if $ y_0x_1-x_0y_1 = 0 \pmod 4 $ then $ (\frac{x_0x_1-5y_0y_1}{4},\frac{y_0x_1-x_0y_1}{4})$ satisfy $x^2 - 5y^2 = 1$ which is pell's equation
so we can group $(x,y)$ into different group, (if exist)
$(4k_0,4k_1+2),(4k_0+2,4k_1)$
$(4k_0+1,4k_1+1),(4k_0+3,4k_1+3)$
$(4k_0+1,4k_1+3),(4k_0+3,4k_1+1)$
$(4k_0+2,4k_1+2),(4k_0+4,4k_1+4)$
Note that $(4k_0+2,4k_1+2),(4k_0+4,4k_1+4)$ if exist, it can be same group with above group. When $(4k_0+3,4k_1+3)$ be the same group with $(4k_0+2,4k_1+2)$ and $(4k_0+1,4k_1+3)$ be the same group with $(4k_0+2,4k_1+2)$, but $(4k_0+1,4k_1+3)$ and $(4k_0+3,4k_1+3)$ can never be in same group, so some group may have no answer. So I split it out.

The base answer for $x^2-5y^2=1$ is $(9,4)$
so if $(x,y)$ is the answer for $x^2-5y^2=-4$ , ($x^2-5y^2=4$ can be solved same way)
the next answer in its group will be get from $(x+\sqrt{5}y)(9+4\sqrt{5}) = (9x+20y) + \sqrt{5}(9y+4x)$,which is $(9x+20y,9y+4x)$
the previous answer in its group will be get from $(x+\sqrt{5}y)(9+4\sqrt{5})^{-1} = (9x-20y) + \sqrt{5}(9y-4x)$,which is $(9x-20y,9y-4x)$
we only care about $x>0,y>0$, In each group we have the the smallest positive solutions.
so the smallest answer satisfy $9x-20y \le 0$ or $9y-4x \le 0$
$\frac{x}{y} \le \frac{20}{9}$ or $\frac{x}{y} \ge \frac{9}{4}$
$\sqrt{5- \frac{4}{y^2}} \le \frac{20}{9}$ or $\sqrt{5- \frac{4}{y^2}} \ge \frac{9}{4}$
$0.894427 \le y \le 8.04984 $
so we can just test $y$ from 1 to 8, and we will find 3 base answer for $x^2-5y^2=-4$ , $(x,y) = (1,1),(4,2),(11,5)$

if $x^2-5y^2=4$,the above ineqution become $\sqrt{5 + \frac{4}{y^2}} \le \frac{20}{9}$ or $\sqrt{5 + \frac{4}{y^2}} \ge \frac{9}{4}$
$0<y \le 8$
so we can just test $y$ from 1 to 8, and we will find 3 base answer for $x^2-5y^2=4$ , $(x,y) = (3,1),(7,3),(18,8)$

all other answers can be generate by $(x+\sqrt{5}y)(9+4\sqrt{5})^n$ , $n$ can be positive or negative integer