Skip to main content
2 of 6
deleted 101 characters in body
user967210
  • 387
  • 2
  • 9

I know the question is old, but is possible to give an exact characterization to d, at least if it's a prime number:

it is known that considering a prime p ≡ 1(mod4), there is always a solution to x² - py² = -1 in integers, the proof is from Mordell "Diophantine Equations" pages 55-56 (thanks to @Will Jagy for pointing that out).

Furthermore Dirichlet proved that if the prime p ≡ 1(mod4) and p ≡ 5(mod8) or p ≡ 9(mod16), the equation x² - 2py² = -1 has still integer solutions (references https://www.forgottenbooks.com/en/download/ThePellEquation_10024828.pdf pag. 80)

So you can say that if p is a prime and p ≡ 5(mod8) or p ≡ 9(mod16) both NPEₚ NPE₂ₚ have integer solutions

user967210
  • 387
  • 2
  • 9