OFFSET
1,4
LINKS
Michel Marcus, Table of n, a(n) for n = 1..5000
Ala'a Al-Kateeb, Mary Ambrosino, Hoon Hong, and Eunjeong Lee, Maximum gap in cyclotomic polynomials, arXiv:1911.11667 [math.NT], 2019.
Hoon Hong, Eunjeong Lee, Hyang-Sook Lee, Cheol-Min Park, Maximum Gap in (Inverse) Cyclotomic Polynomial, arXiv:1101.4255 [math.NT], 2011.
FORMULA
a(p) = a(p*q) = p-1 for primes p < q (by Hong et al.). - Jonathan Sondow, Jan 09 2014
EXAMPLE
Cyc(9) = x^6 + x^3 + x^0, so a(9) = 3.
MATHEMATICA
a[n_] := Max[Differences[Exponent[Cyclotomic [n, x], x, List]]] (* Jonathan Sondow, Jan 09 2014 *)
PROG
(PARI) { mtermgap(pol)=local(p, m); m=0; p=0; for(k=0, poldegree(pol), if(polcoeff(pol, k)!=0, if(m<p, m=p); p=0, p=p+1)); max(m, p)+1 }
for(n=1, 200, print1(mtermgap(polcyclo(n))", "))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ralf Stephan, Sep 25 2003
STATUS
approved