Cyclotomic polynomial
Haskell, 120 bytes



import Data.Complex
p%a=zipWith(\x y-&gt;x-a*y)(p++[0])$0:p
f n=foldl(%)[1][cis(2*pi/fromInteger n)^^k|k&lt;-[1..n],gcd n k&lt;2]


Try it online!

Gives a list of complex floats that has entries like 1.0000000000000078 :+ 3.314015728506092e-14 due to float inacurracy. A direct method of multiplying out to recover the polynomial from its roots.



The fromInteger is a big concession to Haskell's type system. There's got to be a better way. Suggestions are welcome. Dealing with roots of unity symbolically might also work.



Haskell, 127 bytes



(h:t)%q|all(==0)t=[]|1&gt;0=h:zipWith(\x y-&gt;x-h*y)t q%q
f n=foldl(%)(1:(0&lt;$[2..n])++[-1])[tail$f k++[0,0..]|k&lt;-[1..n-1],mod n k&lt;1]


Try it online!

No imports.

Uses the formula



Computes Φ_n(x) by dividing the LHS by each of the other terms in the RHS.

The operator % does division on polynomials, relying on the remainder being zero. The divisor is assumed to be monic, and is given without the leading 1, and also with infinite trailing zeroes to avoid truncating when doing zipWith.