$p\equiv 2\pmod 3$ is an odd prime. Prove that there are no integers $x$, $y$ satisfying $p=x^2-xy+y^2$.
The textbook says because when $p\equiv 2\pmod 3$ is an odd prime, $\left( \frac{-3}{p} \right) =-1$. But I don't know how to use $\left( \frac{-3}{p} \right) =-1$ to prove the result.
Not certain why $(-3/p) = -1$ matters?
0 and 1 are the QRs modulo $3$. Assume $x$ and $y$ exist such that $x^2 -xy +y^2 = p \equiv 0$ is prime.
If $x^2 \equiv y^2 \equiv 0 \pmod 3$, then $3 \mid p$ and it's not prime.
If $x^2 \equiv y^2 \equiv 1$, then $xy \equiv 1$ or $2$, and $p \equiv 0$ or $1$, which is not $2$.
Hence if they exist, $x \equiv 1$ or $2, y \equiv 0$ WLOG. But for a prime, $p \equiv 2 \pmod 3 \iff p \equiv 5 \pmod 6$. Then in modulo $6$, $x^2 \equiv 1$ or $4, y^2 \equiv 0$ or $3$, and $xy \equiv 0$ or $3$.
Adding $0$s or $3$s to $1$ or $4$ will never get us to $5 \pmod 6$. Therefore we have contradiction, and the $x$ and $y$ we sought do not exist.