TITLE: On $x^5+x+1\equiv 0 \mod p$
QUESTION [8 upvotes]: Prove that if $x^2 \equiv p \mod{23}$ has no integer solutions then  $x^5+x+1\equiv 0 \mod p$ has integer solutions.
I found this after I test for the first 10000 prime numbers, but I don't know how to prove this.

REPLY [5 votes]: If $(-23/p) = -1$, then $p$ is inert in the quadratic number field $k = {\mathbb Q}(\sqrt{-23})$. We know that $Cl(k) = 3$, and that its Hilbert class field is $K = k(\alpha)$, where $\alpha$ is a root of $f(x) = x^3 - x^2 + 1$. Since $p$ is principal in $k$, it must split completely in $K/k$. But this implies that $f$ is, modulo $p$, the product of a linear and a quadratic factor by the decomposition law in $S_3$-extensions. Since $x^5+x+1 = (x^2+x+1)(x^3-x^2+1)$, this proves the claim.