22 lines
514 B
Text
22 lines
514 B
Text
Cyclotomic[#, x] & /@ Range[30] // Column
|
|
i = 1;
|
|
n = 10;
|
|
PrintTemporary[Dynamic[{magnitudes, i}]];
|
|
magnitudes = ConstantArray[True, n];
|
|
While[Or @@ magnitudes,
|
|
coeff = Abs[CoefficientList[Cyclotomic[i, x], x]];
|
|
coeff = Select[coeff, Between[{1, n}]];
|
|
coeff = DeleteDuplicates[coeff];
|
|
If[Or @@ magnitudes[[coeff]],
|
|
Do[
|
|
If[magnitudes[[c]] == True,
|
|
Print["CyclotomicPolynomial(", i,
|
|
") has coefficient with magnitude ", c]
|
|
]
|
|
,
|
|
{c, coeff}
|
|
];
|
|
magnitudes[[coeff]] = False;
|
|
];
|
|
i++;
|
|
]
|