For this particular equation it is relevant to this sequence a038873.because primes congruent to {1, 2, 7} mod 8. where (8) is the key.

I tried this with prime 11 --- x^2-11y = 8 and starting with 5^2 -8 the residual pattern was more complex then 19, mainly --6,8,7,3,7,8,6,1,4,4,1,6,1 then repeats the pattern --6,8,7,3,7,8,3,1,4,4,1,6,1 ..