The title says it all… I’m looking to prove (in an elementary way, if possible) the following question:
Conjecture: If $q$ and $p$ are positive integers such that $q^2-2p^2=2$ and $2p^2+1 \pm pq$ is an integer square, then $(q,p)=(2,1)$ or $(q,p)=(10,7)$.
I’ve verified the conjecture for $1 \le p \le q \le 6000$ [and counting].
EDIT: Notice that $(q-p)(q+p)=p^2+2$, and the first solution has $q+p=3$ [with $q-p=1$], and the second solution has $q-p=3$ [with $q+p=17$]. Not sure if that’s helpful, but I thought it an interesting connection…
For some integer $r$, we have
$$2p^2+1\pm pq=r^2,$$
which is to say
$$ p^2 q^2=(r^2-2p^2-1)^2.$$
Since $q^2-2p^2=2$, then
$$p^2 (2p^2+2)=(r^2-2p^2-1)^2.$$
Rearranging this as a quadratic in $p^2$ yields
$$2p^4-(4r^2-2)p^2+(r^2-1)^2=0.$$
The discriminant must be a perfect square, and thus $$\Delta=2r^4-1=s^2$$ for some integer $s$. Hence [by Ljunggren’s theorem] the only solutions are $$(r, s)=(\pm1, \pm1), (\pm13, \pm 239).$$