0
$\begingroup$

Let $p$ be an odd prime; and $a$ and $b$ are integers with $1\leq a, b \leq \dfrac{p-1}{2}$.

Is it true that

$p \mid a^2+ab+b^2 \text{ (for some choice of } a \text{ and } b) \iff p \not \equiv 2 \pmod{3},$

or equivalently,

$p \not\mid a^2+ab+b^2 \text{ (for no choice of } a \text{ and } b)\iff p \equiv 2 \pmod{3}?$

I'm totally stuck! Quite new in Number Theory.

Any help will be much appreciated.

  • 0
    The first and second statements are not equivalent.2017-01-12
  • 0
    Why not, please? @S.C.B.2017-01-12
  • 2
    $p \implies q$ is not equivalent to ~$p \implies $ ~$q$.2017-01-12
  • 0
    Generally, you are right. But this time, they are equivalent; provided $p \neq 3$. Let me make a proper edit in the question. Thanks2017-01-12
  • 0
    Can you understand my answer?2017-01-12
  • 0
    I'm now going through Quadratic Residues; finishing it I'll get back. I've understood everything else. Thanks.2017-01-12

1 Answers 1

2

You are slightly off, as since $$1^2+1 \times 1 +1^2 \equiv 0 \pmod 3$$ $p=3$ is posible as well. This can be proved as follows. $$a^2+ab+b^2 \equiv 0 \pmod p \implies (2a+b)^2+3b^2 \equiv 0 \pmod p$$ Thus, if $b^{*}$ is modulo inverse of $b$ modulo $p$, then we have that $$(2ab^{*}+1)^2 \equiv -3 \pmod p$$ So $-3$ is a quadratic residue of $p$, so we have that $p \equiv 1 \pmod 3$ or $p=3$. For why this is true, see here.

  • 0
    The very first write-up was enough!2017-01-12