Skip to main content
2 of 3
improved formatting; Post Made Community Wiki

Primitive nth root of unity in a finite field $\mathbb{F}_p$

I am given a prime $p$ and another number $k$ ($k$ is likely a power of $2$). I want an efficient algorithm to find the $k$th root of unity in the field $\mathbb{F}_p$. Can someone tell me how to do this?