TITLE: Show that there exists $f ∈ \mathbb{Z}$ such that $f^2 + f +1 ≡ 0 \pmod p$.
QUESTION [5 upvotes]: Let $p ≡ 1 \pmod 3$ be a prime. Show that there exists $f \in \mathbb{Z}$ such that $f^2 + f +1 \equiv 0 \pmod p$.

I know the first few primes of this form are: $7,13,19$
So for example $p=7$ we have $2^2+2+1\equiv0 \pmod 7$ but this is the only example I can think of.
Perhaps this has something to do with showing $f^2\equiv f\equiv1\equiv0 \pmod p$? Then summing them into one congruence? Or perhaps this has something to do with Hensel's lemma?

REPLY [3 votes]: Hint $\, $ If $\rm\:g\:$ has order $\rm\:3n = p\!-\!1\:$ then $\rm\:f := g^n\!\ne 1,\,\ f^3\! = 1\,$ $\Rightarrow$ $\rm\,0 = f^3\!-\!1 = (f\!-\!1)(f^2\!+f+1)$