$\begingroup$

Let me interchange $x$ and $y$ for my own convenience. We want to solve $$x^2 - 5y^2 = \pm 4$$ over the integers.

Solving these equations corresponds to finding the elements of norm $\pm 4$ in the quadratic integer ring $\mathbf{Z}[\sqrt{5}]$, where the norm is the function given by $$N(x+\sqrt{5}y) = (x+\sqrt{5}y)(x-\sqrt{5}y) = x^2 - 5y^2.$$

Finding these elements is an exercise in algebraic number theory. The real quadratic number field $\mathbf{Q}(\sqrt{5})$ has $\mathbf{Z}[\omega]$ with $\omega = (1+\sqrt{5})/2$ as its ring of integers, and $\mathbf{Z}[\sqrt{5}]$ is a subring of this. The field norm on $\mathbf{Q}(\sqrt{5})$ agrees with the norm given above for elements of $\mathbf{Z}[\sqrt{5}]$.

Lemma I.7.2 in Neukirch's Algebraic Number Theory yields that up to multiplication by units in $\mathbf{Z}[\omega]$, there are only finitely many elements of a given norm in $\mathbf{Z}[\omega]$. Since $\mathbf{Z}[\sqrt{5}] \subset \mathbf{Z}[\omega]$ and the norms agree, up to multiplication by units in $\mathbf{Z}[\omega]$ there are only finitely many elements of norm $4$ in $\mathbf{Z}[\sqrt{5}]$.

By Dirichlet's unit theorem the group of units of $\mathbf{Z}[\omega]$ has rank $1$. A generator of this group, or a fundamental unit of $\mathbf{Q}(\sqrt{5})$, is given by $$\varepsilon = \frac{1+\sqrt{5}}{2},$$ which has norm $-1$.

Since the norm of an element $\alpha$ is the same as the norm of the principal ideal $(\alpha)$, it is useful to determine the number of ideals of norm $4$ in $\mathbf{Z}[\omega]$. By this answer to an other question this number is $$\sum_{m|4} \chi(m) = \chi(1) + \chi(2) + \chi(4) = \left(\frac{1}{5}\right) + \left(\frac{2}{5}\right) + \left(\frac{4}{5}\right) = 1 - 1 + 1 = 1.$$

Hence if $\alpha, \beta$ are two elements of norm $4$, then $(\alpha) = (\beta)$, so $\beta = u\alpha$ for a unit $u$. That is, up to multiplication by units in $\mathbf{Z}[\omega]$ there is only one element $\alpha$ of norm $4$.

Take $\alpha = 2$; then all the elements of norm $4$ in $\mathbf{Z}[\omega]$ are given by $2\varepsilon^n$, for integer $n$. But since $2\mathbf{Z}[\omega] \subset \mathbf{Z}[\sqrt{5}]$, all of these elements in fact belong to $\mathbf{Z}[\sqrt{5}]$. Hence all the solutions to the original equation are the $(x_n, y_n)$ given by $2\varepsilon^n = x_n + \sqrt{5}y_n$.

From the identity $\varphi^n = \frac{L_n + \sqrt{5}F_n}{2}$ of real numbers for nonnegative $n$ mentioned at the end of this section of the Wikipedia article on Lucas numbers it follows that $$2\varepsilon^n = L_n + \sqrt{5}F_n$$ for nonnegative $n$.

For negative $n$ you get extra solutions like $(1,-1)$ and $(-3,1)$, but you could have predicted those from the beginning: if $(x,y)$ is a solution, then so are $(-x,y)$, $(x,-y)$ and $(-x,-y)$.

I should mention that with SAGE you can do calculations in $\mathbf{Q}(\sqrt{5})$,

K.<s> = QuadraticField(5) eps = (1+s)/2 # = K.units()[0] for n in range(0,15): print 2*eps^n

and also with Fibonacci and Lucas numbers:

for n in range(0,15): print (fibonacci(n), lucas_number2(n,1,-1))

These two pieces of code give the same output (up to formatting).

Edit (01/11/14): A more elementary way to see that there is only one ideal of norm 4 in $\mathbf{Z}[\omega]$ is as follows:

The quadratic field $\mathbf{Q}(\sqrt{5})$ has discriminant $5$ and has no complex embeddings; hence by this inequality we have $N(I) \geq N(x)/\sqrt{5}$ for any ideal $I$ and element $x \in I$. Since $\mathbf{Z}[\omega]$ is a Dedekind domain we have unique factorization of ideals into primes. For a prime $\mathfrak{p} \subset \mathbf{Z}[\omega]$ lying over $p$ we get $N(\mathfrak{p}) \geq p^2/\sqrt{5}$. Since $p^2/\sqrt{5} > 4$ for $p > 2$, the primes of norm at most $4$ must lie over $2$. The minimal polynomial $X^2 - X - 1$ of $\omega$ is irreducible mod $2$, so $2$ is inert in $\mathbf{Z}[\omega]$ by the Kummer-Dedekind theorem. That is, $(2)$ is the only prime with norm at most $4$, and its norm is exactly $4$. By unique factorization into primes and multiplicativity of the norm, $(2)$ is the only ideal of norm $4$ in $\mathbf{Z}[\omega]$.