Solve $x^n \equiv -1 \ (mod \ p)$ given $n$ and prime $p$

93 Views Asked by At

Given $n$ and a prime $p$, I'd like to ask how to obtain all solutions to $x^n \equiv -1 \ (mod \ p)$.

1

There are 1 best solutions below

2
On BEST ANSWER

Use Discrete Logarithm to find $n$ind$_gx\equiv\dfrac{\phi(p)}2\pmod{\phi(p)}$ where $g$ is one of the primitive roots $\pmod p$

Now use Linear Congruence.

Generalization : We can replace $p$ with any number that has a primitive root.