# Showing this equation has no small integer solutions?

Let $n > 2$ be an integer. I've got a pair of equations

$$x^2 = (n^2 - 2)y^2 \pm 1,$$

one of which has a solution when $y=n$ (with +1); I'm trying to say that, when $1 \leq y < n$, neither equation has a solution.

-
...and when $\,y=n\,$ you get $\,x^2=(n^2-2)n^2\pm 1$ ...how does this have a (integer, of course) solution with -1? With +1 it does, though: $\,x^2=(n^2-1)^2\,$ –  DonAntonio May 27 '12 at 13:24
@DonAntonio $(n^2-2)(n^2)+1 = n^4-2n^2+1 = (n^2-1)^2.$ –  Ragib Zaman May 27 '12 at 13:25
@DonAntonio It doesn't have a solution with -1. I guess I mean that I have a pair of equations, one of which has a solution when $y=n$, and I'm trying to say that, when $1 \leq y < n$, neither equation has a solution. I'll edit the question to clarify this. –  Martha Jones May 27 '12 at 13:29
Observation that may be irrelevant: $(y,x)=(2^k n, 2^kn^2-1)$ are always solutions. –  Ragib Zaman May 27 '12 at 13:45
Very recently the same equation was the subject of a question. For $-1$ there is no solution if $n>2$. For $1$ the fundamental solution is $(n^2-1,n)$. –  André Nicolas May 27 '12 at 14:01

André's link shows that the $-1$ case never has solutions, so we can focus on the $+1$ case. We can see that $(n^2-2)y^2+1 = n^2y^2 - 2y^2+1$ is less than $n^2y^2$ when $y\geq 1$ as we assumed. We can also check that $$(n^2-2)y^2+1 > (ny-1)^2$$ by writing a sequence of equivalent inequalities until we see one to be true. Expanding gives:$$n^2y^2 - 2y^2 + 1 > n^2y^2 - 2ny + 1 .$$ Subtracting common terms leaves $$-2y^2 > - 2ny$$ and that is equivalent to $y<n$ which is assumed. Thus if $1\leq y<n$ then $(n^2-2)y^2+1$ lies between two consecutive squares, and thus can not be a perfect square itself.