In this paper all integral
solutions to the equation x2= 4qn− 4q + 1 when q is an odd prime are
determined. This is done by working in a quadratic field, using the unique
factorization of ideals to reduce the problem to one about certain binary linear
recurrences. One of the results is that the equation has no solutions with n > 2 if
q > 5.