Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My question is why the following holds:

$$ p\equiv-1\pmod{3}\Rightarrow p\nmid a^2\pm a+1,\forall a\in \mathbb{N} $$

share|cite|improve this question
up vote 2 down vote accepted

For $p > 2$, $$a^2 \pm a + 1 = \frac{1}{4} (4a^2 \pm 4a + 4) = \frac{1}{4}(2a \pm 1)^2 + \frac{3}{4}$$ So it suffices to show that $-3$ is a quadratic nonresidue. This follows from quadratic reciprocity. For $p = 2$, $a^2 \pm a + 1$ is easily seen to be always odd.

share|cite|improve this answer
Thank you. I will look into quadratic reciprocity – hxhxhx88 Jan 12 '13 at 7:06

Even simpler: $(a^2 \pm a + 1)|(a^6 - 1)$. Hence if $a^2 \pm a + 1$ has a root then $a^6 - 1$ has a root which is not $\pm 1$, implying modulo $p$ there is an element of order $3$ or $6$ implying $p \equiv 1 \pmod{3}$ (this fails for $p=3$, but that case we're already done!)

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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