galois.primitive_roots

galois.primitive_roots(n)[source]

Finds all primitive n-th roots of unity that satisfy x^k = 1 (mod n).

Parameters

n (int) – A positive integer n > 1.

Returns

An array of integer roots of unity modulo n.

Return type

np.ndarray