According to OEIS Sequence A002476 (https://oeis.org/A002476), it says that all primes of the form $6n+1$ can be written in the form: $x^2 - xy + 7y^2$ with $x$ and $y$ non-negative. I was wondering if anyone had a proof of this.
Thanks!
According to OEIS Sequence A002476 (https://oeis.org/A002476), it says that all primes of the form $6n+1$ can be written in the form: $x^2 - xy + 7y^2$ with $x$ and $y$ non-negative. I was wondering if anyone had a proof of this.
Thanks!
We can write $$ x^2-xy+7y^2=\Big(x-\frac{1+3\sqrt{-3}}{2}y\Big)\Big(x-\frac{1-3\sqrt{-3}}{2}y\Big) $$
so (since $\mathbb{Q}(\sqrt{-3})$ is a PID) determining which primes can be written in the form $x^2-xy+7y^2$ reduces to the question of which primes split in $\mathbb{Q}(\sqrt{-3})$.
If $p$ is an odd prime, then $p$ splits in $\mathbb{Q}(\sqrt{-3})$ if and only if $(\frac{-3}{p})=1$. By quadratic reciprocity we have $$ \Big(\frac{-3}{p}\Big)=\Big(\frac{-1}{p}\Big)\Big(\frac{3}{p}\Big)=\Big(\frac{p}{3}\Big) $$ hence $(\frac{-3}{p})=1$ if and only if $p\equiv 1$ (mod $3$). Since $p$ is odd, this means that $p$ splits in $\mathbb{Q}(\sqrt{-3})$ if and only if $p\equiv 1$ (mod $6$).
This of course leaves out the case $p=2$, but for this note that if $x^2-xy+7y^2$ is even then both $x$ and $y$ must be even, in which case $x^2-xy+7y^2$ must be divisible by $4$.