Evidently Legendre showed that, for positive primes, if $p \equiv 3 \pmod 8$ there is an integral solution to $x^2 - p y^2 = -2.$ Next, if $q \equiv 7 \pmod 8$ there is an integral solution to $x^2 -q y^2 = 2.$


What I would like, and seems to be true, is $x^2 - 2 p y^2 = -2$ for $p \equiv 3 \pmod 8,$ and $x^2 - 2 q y^2 = 2$ for $q \equiv 7 \pmod 8.$ It is probably in Mordell's book, which I do not have here. 


Mordell does $x^2 - r y^2 = -1$ for any prime $r \equiv 1 \pmod 4,$ I do remember that. Anyway, I am writing up something and this issue came up. 


P.S. Note these are the same as $2x^2 - p y^2 = -1$ if $p \equiv 3 \pmod 8,$ while if $q \equiv 7 \pmod 8$ there is $2x^2 -q y^2 = 1.$



probably Lagrange or Legendre, Pell variant
According to Dickson (History of numbers Vol. 2, Ch. XII, p.376), Göpel (Jour. für Math. 45, 1853, 1-14) proved your conjectures "by use of continued fractions".


Actually Jour. für Math. stands for Crelle's journal, and Göpel's paper (which is his 1835 doctoral dissertation) is available online [here](http://www.digizeitschriften.de/dms/img/?PPN=PPN243919689_0045&DMDID=dmdlog4).


