The nth cyclotomic polynomial, n(z), is the monic polynomial whose (n) distinct roots are the nth primitive roots of unity. n(z) can be computed efficiently as a quotient of terms of the form (1 - zd ) by way of a method the authors call the Sparse Power Series algorithm. We improve on this algorithm in three steps, ultimately deriving a fast, recursive algorithm to calculate n(z). The new algorithm, which we have implemented in C, allows us to compute n(z) for n > 109 in less than one minute.
Andrew Arnold, Michael B. Monagan