Number of roots of $x^3 \equiv 1 \pmod p$

98 Views Asked by At

How to find the number of roots of $x^3 \equiv 1 \pmod p$ in an interval $[a,b]$?
For instance, let $p=31$ and $[a,b] = [1,100]$ so the equation becomes $x^3 \equiv 1 \pmod {31}$

1

There are 1 best solutions below

4
On

$$x^3=1\iff (x-1)(x^2+x+1)=0$$

One root is clearly $\;x=1\;$ , and the others must come from the quadratic, whose discriminant is

$$\Delta=1^2-4\cdot1\cdot1=-3$$

Thus, besides one, there are other roots iff $\;-3\;$ is a square modulo $\;p\;$ . For $\;p=3\;$ we have, of course, one unique triple roots, since $\;x^3-1=(x-1)^3\;$