I want to know which primes $p$ can be written in the form $p=x^2-ny^2$ for given $n \in \mathbb{N}$. If $n$ is squarefree, $n \not\equiv 1 \mod 4$ and $\mathbb{Z}[\sqrt{n}]$ is a principal ideal domain, this has been answered [here][1]. Is anything known about the other cases? [1]: https://mathoverflow.net/questions/197918/what-is-known-about-primes-of-the-form-x2-2y2