Is there an integer $n\ge1$ such that every prime $p\equiv1\pmod{9}$ is representable in the form $x^2+ny^2$?



Is there an $n\ge1$ such that every prime $p\equiv1\pmod{9}$ is representable in the form $x^2+ny^2$?
Yes, $n=3$ works, and no other integer works. The "no other" part follows easily by inspecting $p=19$ and $p=37$. The "works" part was conjectured by Fermat in 1654 and proved by Euler in 1772. In modern terminology, the proof is quite simple, and it goes as follows (I give an outline):


A prime $p\nmid 2n$ is represented by a primitive form of discriminant $-4n$ if and only if $(-n/p)=1$ (see Corollary 2.6 in Cox: Primes of the form $x^2+ny^2$). In particular, if $x^2+ny^2$ is the only primitive form of discriminant $-4n$ up to equivalence, then a prime $p\nmid 2n$ is represented by it if and only if $(-n/p)=1$. This is certainly the case for $n=3$, and then also $(-n/p)=(p/3)$ by quadratic reciprocity. So we get that a prime $p>3$ is represented by $x^2+3y^2$ if and only if $p\equiv 1\pmod{3}$.


