

A230798


The number of distinct coefficients in the nth cyclotomic polynomial.


4



2, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 3, 2, 1, 3, 1, 3, 3, 2, 1, 3, 2, 2, 2, 3, 1, 3, 1, 2, 3, 2, 3, 3, 1, 2, 3, 3, 1, 3, 1, 3, 3, 2, 1, 3, 2, 3, 3, 3, 1, 3, 3, 3, 3, 2, 1, 3, 1, 2, 3, 2, 3, 3, 1, 3, 3, 3, 1, 3, 1, 2, 3, 3, 3, 3, 1, 3, 2, 2, 1, 3, 3, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

a(n) = 1 if n is a prime.
The sum of the coefficients in the nth cyclotomic polynomial is given by A020500.
The first occurrence of 4 in this sequence is a(105).


LINKS



EXAMPLE

a(12)=3 because the distinct coefficients of the 12th cyclotomic polynomial, x^4x^2+1, are 0, 1 and 1.


MATHEMATICA

Table[Length[Union[CoefficientList[Cyclotomic[n, x], x]]], {n, 100}] (* T. D. Noe, Dec 09 2013 *)


PROG

(PARI) a(n) = #vecsort(Vec(polcyclo(n)), , 8)


CROSSREFS

Cf. A231611 (least k for which cyclotomic(k) has n distinct terms).


KEYWORD

nonn


AUTHOR



STATUS

approved



