MATHEMATICS OF COMPUTATION Volume 80, Number 276, October 2011, Pages 2359–2379 S 0025-5718(2011)02467-1 Article electronically published on February 17, 2011 CALCULATING CYCLOTOMIC POLYNOMIALS ANDREW ARNOLD AND MICHAEL MONAGAN Abstract. We present three algorithms to calculate Φ n (z), the n th cyclo- tomic polynomial. The first algorithm calculates Φ n (z) by a series of polyno- mial divisions, which we perform using the fast Fourier transform. The second algorithm calculates Φ n (z) as a quotient of products of sparse power series. These two algorithms, described in detail in the paper, were used to calcu- late cyclotomic polynomials of large height and length. In particular, we have found the least n for which the height of Φ n (z) is greater than n, n 2 , n 3 , and n 4 , respectively. The third algorithm, the big prime algorithm, generates the terms of Φ n (z) sequentially, in a manner which reduces the memory cost. We use the big prime algorithm to find the minimal known height of cyclotomic polynomials of order five. We include these results as well as other exam- ples of cyclotomic polynomials of unusually large height, and bounds on the coefficient of the term of degree k for all cyclotomic polynomials. 1. Introduction The n th cyclotomic polynomial,Φ n (z), is the monic polynomial whose φ(n) distinct roots are exactly the n th primitive roots of unity. (1) Φ n (z)= n j=1 gcd(j,n)=1 z − e 2πij/n . It is an irreducible polynomial over Z with degree φ(n), where φ(n) is Euler’s totient function. The n th inverse cyclotomic polynomial,Ψ n (z), is the polynomial whose roots are the n th nonprimitive roots of unity. (2) Ψ n (z)= n j=1 gcd(j,n)>1 z − e 2πij/n . As the roots of Φ n (z) and Ψ n (z) comprise all n th roots of unity, we have (3) Ψ n (z)= z n − 1 Φ n (z) . For more about inverse cyclotomic polynomials, see Moree [19]. Let the order of Φ n (z) denote the number of distinct odd prime divisors of n. To make the distinction between the order of Φ n (z) and n, we will refer to n as the index of Φ n (z) in this paper. Received by the editor October 10, 2008 and, in revised form, July 17, 2010. 2010 Mathematics Subject Classification. Primary 11Y16, Secondary 12-04. This work was supported by NSERC of Canada and the MITACS NCE of Canada. c 2011 American Mathematical Society Reverts to public domain 28 years from publication 2359 License or copyright restrictions may apply to redistribution; see https://www.ams.org/journal-terms-of-use