In mathematics, the nth cyclotomic polynomial, for any positive integer n, is the unique irreducible polynomial with integer coefficients that is a divisor of and is not a divisor of for any k < n. Its roots are all nth primitive roots of unity , where k runs over the positive integers less than n and coprime to n (and i is the imaginary unit). In other words, the nth cyclotomic polynomial is equal to
It may also be defined as the monic polynomial with integer coefficients that is the minimal polynomial over the field of the rational numbers of any primitive nthroot of unity ( is an example of such a root).
An important relation linking cyclotomic polynomials and primitive roots of unity is
showing that is a root of if and only if it is a d th primitive root of unity for some d that divides n.^{[1]}
If n is a prime number, then
If n = 2p where p is a prime number other than 2, then
For n up to 30, the cyclotomic polynomials are:^{[2]}
The case of the 105th cyclotomic polynomial is interesting because 105 is the least positive integer that is the product of three distinct odd prime numbers (3*5*7) and this polynomial is the first one that has a coefficient other than 1, 0, or −1:^{[3]}
The cyclotomic polynomials are monic polynomials with integer coefficients that are irreducible over the field of the rational numbers. Except for n equal to 1 or 2, they are palindromes of even degree.
The degree of , or in other words the number of nth primitive roots of unity, is , where is Euler's totient function.
The fact that is an irreducible polynomial of degree in the ring is a nontrivial result due to Gauss.^{[4]} Depending on the chosen definition, it is either the value of the degree or the irreducibility which is a nontrivial result. The case of prime n is easier to prove than the general case, thanks to Eisenstein's criterion.
A fundamental relation involving cyclotomic polynomials is
which means that each nth root of unity is a primitive dth root of unity for a unique d dividing n.
The Möbius inversion formula allows to be expressed as an explicit rational fraction:
where is the Möbius function.
The cyclotomic polynomial may be computed by (exactly) dividing by the cyclotomic polynomials of the proper divisors of n previously computed recursively by the same method:
(Recall that .)
This formula defines an algorithm for computing for any n, provided integer factorization and division of polynomials are available. Many computer algebra systems, such as SageMath, Maple, Mathematica, and PARI/GP, have a builtin function to compute the cyclotomic polynomials.
As noted above, if n is a prime number, then
If n is an odd integer greater than one, then
In particular, if n = 2p is twice an odd prime, then (as noted above)
If n = p^{m} is a prime power (where p is prime), then
More generally, if n = p^{m}r with r relatively prime to p, then
These formulas may be applied repeatedly to get a simple expression for any cyclotomic polynomial in terms of a cyclotomic polynomial of square free index: If q is the product of the prime divisors of n (its radical), then^{[5]}
This allows formulas to be given for the nth cyclotomic polynomial when n has at most one odd prime factor: If p is an odd prime number, and h and k are positive integers, then
For the other values of n, the computation of the nth cyclotomic polynomial is similarly reduced to that of where q is the product of the distinct odd prime divisors of n. To deal with this case, one has that, for p prime and not dividing n,^{[6]}
The problem of bounding the magnitude of the coefficients of the cyclotomic polynomials has been the object of a number of research papers. Several survey papers give an overview.^{[7]}
If n has at most two distinct odd prime factors, then Migotti showed that the coefficients of are all in the set {1, −1, 0}.^{[8]}
The first cyclotomic polynomial for a product of three different odd prime factors is it has a coefficient −2 (see its expression above). The converse is not true: only has coefficients in {1, −1, 0}.
If n is a product of more different odd prime factors, the coefficients may increase to very high values. E.g., has coefficients running from −22 to 23, , the smallest n with 6 different odd primes, has coefficients of magnitude up to 532.
Let A(n) denote the maximum absolute value of the coefficients of Φ_{n}. It is known that for any positive k, the number of n up to x with A(n) > n^{k} is at least c(k)⋅x for a positive c(k) depending on k and x sufficiently large. In the opposite direction, for any function ψ(n) tending to infinity with n we have A(n) bounded above by n^{ψ(n)} for almost all n.^{[9]}
A combination of theorems of Bateman resp. Vaughan states^{[7]}^{: 10 } that on the one hand, for every , we have
for all sufficiently large positive integers , and on the other hand, we have
for infinitely many positive integers . This implies in particular that univariate polynomials (concretely for infinitely many positive integers ) can have factors (like ) whose coefficients are superpolynomially larger than the original coefficients. This is not too far from the general LandauMignotte bound.
Let n be odd, squarefree, and greater than 3. Then:^{[10]}^{[11]}
where both A_{n}(z) and B_{n}(z) have integer coefficients, A_{n}(z) has degree φ(n)/2, and B_{n}(z) has degree φ(n)/2 − 2. Furthermore, A_{n}(z) is palindromic when its degree is even; if its degree is odd it is antipalindromic. Similarly, B_{n}(z) is palindromic unless n is composite and ≡ 3 (mod 4), in which case it is antipalindromic.
The first few cases are
Let n be odd, squarefree and greater than 3. Then^{[11]}
where both U_{n}(z) and V_{n}(z) have integer coefficients, U_{n}(z) has degree φ(n)/2, and V_{n}(z) has degree φ(n)/2 − 1. This can also be written
If n is even, squarefree and greater than 2 (this forces n/2 to be odd),
where both C_{n}(z) and D_{n}(z) have integer coefficients, C_{n}(z) has degree φ(n), and D_{n}(z) has degree φ(n) − 1. C_{n}(z) and D_{n}(z) are both palindromic.
The first few cases are:
The Sister Beiter conjecture is concerned with the maximal size (in absolute value) of coefficients of ternary cyclotomic polynomials where are three prime numbers.^{[12]}
Over a finite field with a prime number p of elements, for any integer n that is not a multiple of p, the cyclotomic polynomial factorizes into irreducible polynomials of degree d, where is Euler's totient function and d is the multiplicative order of p modulo n. In particular, is irreducible if and only if p is a primitive root modulo n, that is, p does not divide n, and its multiplicative order modulo n is , the degree of .^{[13]}
These results are also true over the padic integers, since Hensel's lemma allows lifting a factorization over the field with p elements to a factorization over the padic integers.
If x takes any real value, then for every n ≥ 3 (this follows from the fact that the roots of a cyclotomic polynomial are all nonreal, for n ≥ 3).
For studying the values that a cyclotomic polynomial may take when x is given an integer value, it suffices to consider only the case n ≥ 3, as the cases n = 1 and n = 2 are trivial (one has and ).
For n ≥ 2, one has
The values that a cyclotomic polynomial may take for other integer values of x is strongly related with the multiplicative order modulo a prime number.
More precisely, given a prime number p and an integer b coprime with p, the multiplicative order of b modulo p, is the smallest positive integer n such that p is a divisor of For b > 1, the multiplicative order of b modulo p is also the shortest period of the representation of 1/p in the numeral base b (see Unique prime; this explains the notation choice).
The definition of the multiplicative order implies that, if n is the multiplicative order of b modulo p, then p is a divisor of The converse is not true, but one has the following.
If n > 0 is a positive integer and b > 1 is an integer, then (see below for a proof)
where
This implies that, if p is an odd prime divisor of then either n is a divisor of p − 1 or p is a divisor of n. In the latter case, does not divide
Zsigmondy's theorem implies that the only cases where b > 1 and h = 1 are
It follows from above factorization that the odd prime factors of
are exactly the odd primes p such that n is the multiplicative order of b modulo p. This fraction may be even only when b is odd. In this case, the multiplicative order of b modulo 2 is always 1.
There are many pairs (n, b) with b > 1 such that is prime. In fact, Bunyakovsky conjecture implies that, for every n, there are infinitely many b > 1 such that is prime. See OEIS: A085398 for the list of the smallest b > 1 such that is prime (the smallest b > 1 such that is prime is about , where is Euler–Mascheroni constant, and is Euler's totient function). See also OEIS: A206864 for the list of the smallest primes of the form with n > 2 and b > 1, and, more generally, OEIS: A206942, for the smallest positive integers of this form.
Proofs



Using , one can give an elementary proof for the infinitude of primes congruent to 1 modulo n,^{[14]} which is a special case of Dirichlet's theorem on arithmetic progressions.
Proof


Suppose is a finite list of primes congruent to modulo Let and consider . Let be a prime factor of (to see that decompose it into linear factors and note that 1 is the closest root of unity to ). Since we know that is a new prime not in the list. We will show that Let be the order of modulo Since we have . Thus . We will show that . Assume for contradiction that . Since we have for some . Then is a double root of Thus must be a root of the derivative so But and therefore This is a contradiction so . The order of which is , must divide . Thus 
Gauss's book Disquisitiones Arithmeticae [Arithmetical Investigations] has been translated from Latin into French, German, and English. The German edition includes all of his papers on number theory: all the proofs of quadratic reciprocity, the determination of the sign of the Gauss sum, the investigations into biquadratic reciprocity, and unpublished notes.