Ask Your Question

Revision history [back]

Cyclotomic Polynomials and Primitive Roots of Unity

I want to print the primitive root of unity $\zeta_m$ associated with the $m'th$ cyclotomic polynomial $\phi_m(x)$ where m is a power of two. I want to print the primitive root of this polynomial over $\mathbb{Z}_p$ with $p$ prime.

I tried the following as an example, with $p = 12206081$ and $m = 16384$. However this prints all the totient(16384) roots rather than just the primitive root.

x = PolynomialRing(GF(12206081), 'x').gen()

n = euler_phi(16384)

f = x^n + 1

print(f.roots())

Cyclotomic Polynomials and Primitive Roots of Unity

I want to print the primitive root of unity $\zeta_m$ associated with the $m'th$ cyclotomic polynomial $\phi_m(x)$ where m is a power of two. I want to print the primitive root of this polynomial over $\mathbb{Z}_p$ with $p$ prime.

I tried the following as an example, with $p = 12206081$ and $m = 16384$. However this prints all the totient(16384) roots rather than just the primitive root.

x = PolynomialRing(GF(12206081), 'x').gen()

'x').gen() n = euler_phi(16384)

euler_phi(16384) f = x^n + 1

print(f.roots())

1 print(f.roots())