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.

  • $\begingroup$ The first and second statements are not equivalent. $\endgroup$
    – S.C.B.
    Jan 12 '17 at 8:04
  • $\begingroup$ Why not, please? @S.C.B. $\endgroup$ Jan 12 '17 at 8:05
  • 2
    $\begingroup$ $p \implies q$ is not equivalent to ~$p \implies $ ~$q$. $\endgroup$
    – S.C.B.
    Jan 12 '17 at 8:06
  • $\begingroup$ Generally, you are right. But this time, they are equivalent; provided $p \neq 3$. Let me make a proper edit in the question. Thanks $\endgroup$ Jan 12 '17 at 8:11
  • $\begingroup$ Can you understand my answer? $\endgroup$
    – S.C.B.
    Jan 12 '17 at 8:13

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.

  • $\begingroup$ The very first write-up was enough! $\endgroup$ Jan 12 '17 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.