galois.
primitive_root
Finds the first, smallest primitive n-th root of unity that satisfy x^k = 1 (mod n).
n (int) – A positive integer n > 1.
The first, smallest primitive root of unity modulo n.
int