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

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.
