Primes of the form $x^2+ny^2$?

1.4k Views Asked by At

So on the topic of sum of two squares, I wanted to see how to extend that to what primes can be expressed as $x^2+ny^2$. I think the way to do this is to show that we can contract a binary quadratic form assuming we can find a number such that $27$ or $64$, in this case, is a quadratic residue $\mod p$, but I'm not sure how to continue.

Is there specific set of primes that can be expressed in terms of modular relations or residual relations? How would you solve this is the case of $27, 64$, or the general case of $n$?

1

There are 1 best solutions below

1
On

A whole book can be written on the topic. In fact, David Cox, no relation to me, has written such a book. Maybe this will get closed for being an overly broad question.

If you have a specific $n$ in mind, you could try finding a few of the corresponding primes expressible by $x^2 + ny^2$ and then looking them up in the OEIS.

Let's try for example $n = 2$. We find that $3, 11, 17, 19$ are of the form $x^2 + 2y^2$. An OEIS search gives more than twenty results, so maybe we should add two more numbers to see if we can narrow it down to a single result. $3, 11, 17, 19, 41, 43$ still gives mroe results than I'd like, but it's easier to find "Primes congruent to $\{1, 3\} \bmod 8$; or, odd primes of form $x^2 + 2y^2$."

Or how about $n = -2$? These turn out to be the primes $p$ such that $$\left( \frac{2}{p} \right) = 1$$ (that's the Legendre symbol).

Do note that $2$ comes up in a lot of these results. Clearly if $x = 0$ and $y = 1$ or $i$, we'll have $x^2 + ny^2 = 2$ for $n = 2$ or $-2$.