Cyclotomic polynomial

Revision as of 19:57, 28 January 2020 by rosettacode>DavidFashion (Created page with "{{task|Cyclotomic Polynomial}} The nth cyclotomic polynomial, for any positive integer n, is the unique irreducible polynomial of largest degree w...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The nth cyclotomic polynomial, for any positive integer n, is the unique irreducible polynomial of largest degree with integer coefficients that is a divisor of x^n − 1, and is not a divisor of x^k − 1 for any k < n.

Task
Cyclotomic polynomial
You are encouraged to solve this task according to the task description, using any language you may know.
task
  • Find and print the first 30 cyclotomic polynomials.
  • Find and print the order of the first 10 cyclotomic polynomials that have i or -i as a coefficient.


See also
  • The sequence A013594 with the smallest order of cyclotomic polynomial containing n or -n as a coefficient.