Find all primes $p$ such that $$x^3+x+1\equiv0\pmod p$$ has $3$ incongruent solutions.
By a standard result in number theory, it has $3$ incongruent solutions iff there exists $q(x),r(x)\in\mathbb{Z}[x]$ with $\deg r(x)<3$ such that $$x^p-x=(x^3+x+1)\,q(x)+p\cdot r(x).$$ I am unable to proceed from here. I tried to write out the coefficients of $q(x)$ and multiply out, but it was in vain. How do I solve this problem? Thanks in advance!
I am unclear about what tags to add, so please fix this.
Such questions lead rapidly to problems in algebraic number theory. Here we need to know at which primes the number field generated by a zero of $x^3+x+1$ splits completely. As this number field does not have an Abelian Galois group, the set of such primes cannot be described simply in terms of congruence conditions.
The discriminant of $f(x)=x^3+x+1$ is $-31$. This means that the splitting field of $f$ is the Hilbert class field of $\mathbb{Q}(\sqrt{-31})$. The primes $p$ that split completely in this field, that is those for which $f(x)\equiv0$ (mod $p$) has three solutions, are those represented by the quadratic form $a^2+ab+8b^2$ (the principal binary quadratic form of discriminant $-31$).
For proofs and much more discussion see David Cox's book Primes of the Form $x^2+ny^2$.
PDF of the entire article, page shown below