Cyclotomic Polynomial

A polynomial given by

 Phi_n(x)=product_(k=1)^n^'(x-zeta_k),
(1)

where zeta_k are the roots of unity in C given by

 zeta_k=e^(2piik/n)
(2)

and k runs over integers relatively prime to n. The prime may be dropped if the product is instead taken over primitive roots of unity, so that

 Phi_n(x)=product_(k=1; primitive zeta_k)^n(x-zeta_k).
(3)

The notation F_n(x) is also frequently encountered. Dickson et al. (1923) and Apostol (1975) give extensive bibliographies for cyclotomic polynomials.

The cyclotomic polynomial for n>1 can also be defined as

 Phi_n(x)=product_(d|n)(1-x^(n/d))^(mu(d))
(4)

where mu(d) is the Möbius function and the product is taken over the divisors d of n (Vardi 1991, p. 225).

Cyclotomic polynomial roots

Phi_n(x) is an integer polynomial and an irreducible polynomial with polynomial degree phi(n), where phi(n) is the totient function. Cyclotomic polynomials are returned by the Wolfram Language command Cyclotomic[n, x]. The roots of cyclotomic polynomials lie on the unit circle in the complex plane, as illustrated above for the first few cyclotomic polynomials.

Cyclotomic

The first few cyclotomic polynomials are

Phi_1(x)=x-1
(5)
Phi_2(x)=x+1
(6)
Phi_3(x)=x^2+x+1
(7)
Phi_4(x)=x^2+1
(8)
Phi_5(x)=x^4+x^3+x^2+x+1
(9)
Phi_6(x)=x^2-x+1
(10)
Phi_7(x)=x^6+x^5+x^4+x^3+x^2+x+1
(11)
Phi_8(x)=x^4+1
(12)
Phi_9(x)=x^6+x^3+1
(13)
Phi_(10)(x)=x^4-x^3+x^2-x+1.
(14)
CyclotomicPhiReImCyclotomicPhiContours

The cyclotomic polynomial Phi_7(z) is illustrated above in the complex plane.

On any line through the origin, the value of a cyclotomic polynomial is strictly increasing outside the unit disk.

If p is an odd prime, then

Phi_p(x)=(x^p-1)/(x-1)
(15)
=x^(p-1)+x^(p-2)+...+x+1
(16)
Phi_(2p)(x)=(x^(2p)-1)/(x^p-1)(x-1)/(x^2-1)
(17)
=x^(p-1)-x^(p-2)+...-x+1
(18)
Phi_(4p)(x)=(x^(4p)-1)/(x^(2p)-1)(x^2-1)/(x^4-1)
(19)
=x^(2p-2)-x^(2p-4)+...-x^2+1
(20)

(Riesel 1994, p. 306). Similarly, for p again an odd prime,

x^p-1=Phi_1(x)Phi_p(x)
(21)
x^(2p)-1=Phi_1(x)Phi_2(x)Phi_p(x)Phi_(2p)(x)
(22)
x^(4p)-1=Phi_1(x)Phi_2(x)Phi_4(x)Phi_p(x)Phi_(2p)(x)Phi_(4p)(x).
(23)

For the first few remaining values of n,

x-1=Phi_1(x)
(24)
x^2-1=Phi_1(x)Phi_2(x)
(25)
x^4-1=Phi_1(x)Phi_2(x)Phi_4(x)
(26)
x^8-1=Phi_1(x)Phi_2(x)Phi_4(x)Phi_8(x)
(27)
x^9-1=Phi_1(x)Phi_3(x)Phi_9(x)
(28)
x^(15)-1=Phi_1(x)Phi_3(x)Phi_5(x)Phi_(15)(x)
(29)
x^(16)-1=Phi_1(x)Phi_2(x)Phi_4(x)Phi_8(x)Phi_(16)(x)
(30)
x^(18)-1=Phi_1(x)Phi_2(x)Phi_3(x)Phi_6(x)Phi_9(x)Phi_(18)(x)
(31)

(Riesel 1994, p. 307).

For p a prime relatively prime to n,

 Phi_(np)(x)=(Phi_n(x^p))/(Phi_n(x)),
(32)

but if p|n,

 Phi_(np)(x)=Phi_n(x^p)
(33)

(Nagell 1951, p. 160).

An explicit equation for Phi_n(x) for squarefree n is given by

 Phi_n(x)=sum_(j=0)^(phi(n))a_(nj)z^(phi(n)-j),
(34)

where phi(n) is the totient function and a_(nj) is calculated using the recurrence relation

 a_(nj)=-(mu(n))/jsum_(m=0)^(j-1)a_(nm)mu(GCD(n,j-m))phi(GCD(n,j-m)),
(35)

with a_(n0)=1, where mu(n) is the Möbius function and GCD(m,n) is the greatest common divisor of m and n.

The polynomial x^n-1 can be factored as

 x^n-1=product_(d|n)Phi_d(x).
(36)

Furthermore,

x^n+1=(x^(2n)-1)/(x^n-1)
(37)
=(product_(d|2n)Phi_d(x))/(product_(d|n)Phi_d(x)).
(38)

The coefficients of the inverse of the cyclotomic polynomial

1/(1+x+x^2)=1-x+x^3-x^4+x^6-x^7+x^9-...
(39)
=sum_(n=0)^(infty)c_nx^n
(40)

can also be computed from

c_n=1-2|_1/3(n+2)_|+|_1/3(n+1)_|+|_1/3n_|
(41)
=1-3|_1/3(n+2)_|+|_n_|
(42)
=2/(sqrt(3))sin[2/3pi(n+1)],
(43)

where |_x_| is the floor function.

For p prime,

 Phi_p(x)=sum_(k=0)^(p-1)x^k,
(44)

i.e., the coefficients are all 1. The first cyclotomic polynomial to have a coefficient other than +/-1 and 0 is Phi_(105)(x), which has coefficients of -2 for x^7 and x^(41). This is true because 105 is the first number to have three distinct odd prime factors, i.e., 105=3·5·7 (McClellan and Rader 1979, Schroeder 1997). The smallest values of n for which Phi_n(x) has one or more coefficients +/-1, +/-2, +/-3, ... are 0, 105, 385, 1365, 1785, 2805, 3135, 6545, 6545, 10465, 10465, 10465, 10465, 10465, 11305, ... (OEIS A013594).

It appears to be true that, for m,n>1, if Phi_m(x)+Phi_n(x) factors, then the factors contain a cyclotomic polynomial. For example,

Phi_7(x)+Phi_(22)(x)=(x^2+1)(x^8-x^7+2x^4+2)
(45)
=Phi_4(x)(x^8-x^7+2x^4+2).
(46)

This observation has been checked up to m,n=150 (Nicol 2000). If m and n are prime, then C_m+C_n is irreducible.

Migotti (1883) showed that coefficients of Phi_(pq)(x) for p and q distinct primes can be only 0, +/-1. Lam and Leung (1996) considered

 Phi_(pq)(x)=sum_(k=0)^(pq-1)a_kx^k
(47)

for p,q prime. Write the totient function as

 phi(pq)=(p-1)(q-1)=rp+sq
(48)

and let

 0<=k<=(p-1)(q-1),
(49)

then

1. a_k=1 iff k=ip+jq for some i in [0,r] and j in [0,s],

2. a_k=-1 iff k+pq=ip+jq for i in [r+1,q-1] and j in [s+1,p-1],

3. otherwise a_k=0.

The number of terms having a_k=1 is (r+1)(s+1), and the number of terms having a_k=-1 is (p-s-1)(q-r-1). Furthermore, assume q>p, then the middle coefficient of Phi_(pq) is (-1)^r.

Resultants of cyclotomic polynomials have been computed by Lehmer (1936), Diederichsen (1940), and Apostol (1970). It is known that rho(Phi_m(x),Phi_n(x))=1 if (m,n)=1, i.e., m and n are relatively prime (Apostol 1975). Apostol (1975) showed that for positive integers m and n and arbitrary nonzero complex numbers a and b,

 rho(Phi_m(ax),Phi_n(bx))=b^(phi(m)phi(n))product_(d|n)[Phi_(m/delta)((a^d)/(b^d))]^(mu(n/d)phi(m)/phi(m/delta)),
(50)

where delta=GCD(m,d) is the greatest common divisor of m and d, phi(n) is the totient function, mu(n) is the Möbius function, and the product is over the divisors of n. If m and n are distinct primes p and q, then (50) simplifies to

 rho(Phi_q(ax),Phi_p(bx))={(a^(pq)-b^(pq))/(a^p-b^p)(a-b)/(a^q-b^q)   for a!=b; a^((p-1)(q-1))   for a=b.
(51)

The following table gives the resultants rho(Phi_k(x), Phi_n(x)) (OEIS A054372).

k\n1234567
10
220
3310
42210
551110
6134110
77111110

The numbers of 1s in successive rows of this table are given by 0, 0, 1, 1, 3, 3, 5, 4, 6, 7, 9, ... (OEIS A075795).

The cyclotomic polynomial Phi_6(x) has the particularly nice Maclaurin series

 1/(Phi_6(x))=1+x-x^3-x^4+x^6+x^7-x^9-x^(10)+...,
(52)

whose coefficients 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, ... (OEIS A010892) are given by solving the recurrence equation

 a(n)=a(n-1)-a(n-2)
(53)

with a(0)=a(1)=1 (Wolfram 2002, p. 128), giving the explicit form

 a(n)=2/3sqrt(3)sin[1/3(n+1)pi].
(54)

Interestingly, any sequence b(n) satisfying the linear recurrence equation

 b(n)=b(n-1)-b(n-2)
(55)

can be written as

 b(n)=b(0)a(n)+[b(1)-b(0)]a(n-1).
(56)

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.