cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

A051664 a(n) is the number of nonzero coefficients in the n-th cyclotomic polynomial.

Original entry on oeis.org

2, 2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 3, 13, 7, 7, 2, 17, 3, 19, 5, 9, 11, 23, 3, 5, 13, 3, 7, 29, 7, 31, 2, 15, 17, 17, 3, 37, 19, 17, 5, 41, 9, 43, 11, 7, 23, 47, 3, 7, 5, 23, 13, 53, 3, 17, 7, 25, 29, 59, 7, 61, 31, 9, 2, 31, 15, 67, 17, 31, 17, 71, 3, 73, 37, 7, 19, 31, 17, 79, 5, 3
Offset: 1

Views

Author

Keywords

Comments

a(n)=p(n) if n=p(n); a(n) is not always A006530(n). - Labos Elemer, May 03 2002
This sequence is the Mobius transform of A087073. Let m be the squarefree part of n, then a(n) = a(m). When n = pq, the product of two distinct odd primes, then there is a formula for a(pq). Let x = 1/p (mod q) and y = 1/q (mod p). Then a(pq) = 2xy-1. There are also formulas for the number of positive and negative terms. See papers by Carlitz or Lam and Leung. - T. D. Noe, Aug 08 2003

Examples

			9th cyclotomic polynomial is x^6+x^3+1 which has 3 terms, so a(9)=3.
		

Crossrefs

Cf. A086765 (number of positive terms in n-th cyclotomic polynomial), A086780 (number of negative terms in n-th cyclotomic polynomial), A086798 (number of zero terms in n-th cyclotomic polynomial), A087073.

Programs

  • Maple
    A051664 := proc(n)
            numtheory[cyclotomic](n,x) ;
            nops([coeffs(%)]) ;
    end proc: # R. J. Mathar, Sep 15 2012
  • Mathematica
    Table[Count[CoefficientList[Cyclotomic[n, x], x], _?(#!=0&)], {n, 0, 100}]
    Table[Length[Cyclotomic[n, x]], {n, 1, 100}] (* Artur Jasinski, Jan 15 2007 *)
  • PARI
    a(n)=sum(k=0,eulerphi(n),if(polcoeff(polcyclo(n),k),1,0))
    
  • PARI
    a(n) = #select(x->x!=0, Vec(polcyclo(n))); \\ Michel Marcus, Mar 05 2017

Formula

a(n) = phi(n) + 1 - A086798(n). - T. D. Noe, Aug 08 2003

Extensions

More terms from Labos Elemer, May 03 2002

A086780 Number of negative terms in n-th cyclotomic polynomial.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 1, 0, 3, 3, 0, 0, 1, 0, 2, 4, 5, 0, 1, 0, 6, 0, 3, 0, 3, 0, 0, 7, 8, 8, 1, 0, 9, 8, 2, 0, 4, 0, 5, 3, 11, 0, 1, 0, 2, 11, 6, 0, 1, 8, 3, 12, 14, 0, 3, 0, 15, 4, 0, 15, 7, 0, 8, 15, 8, 0, 1, 0, 18, 3, 9, 15, 8, 0, 2, 0, 20, 0, 4, 20, 21, 19, 5, 0, 3, 11, 11, 20, 23, 15, 1
Offset: 1

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 03 2003

Keywords

References

Crossrefs

Cf. A051664 (number of nonzero terms in n-th cyclotomic polynomial).

Programs

  • Mathematica
    Table[Count[CoefficientList[Cyclotomic[n, x], x], _?(#<0&)], {n, 0, 100}]
  • PARI
    a(n) = #select(x->(x<0), Vec(polcyclo(n))); \\ Michel Marcus, Apr 18 2018

Formula

a(n) = 0 iff n is a prime power. - T. D. Noe, Aug 08 2003
a(n) = (A051664(n)-1)/2 if n is not a prime power and has at most two distinct odd prime divisors. So 105 is the smallest n>1 where neither formula applies. - Aaron Meyerowitz, Apr 18 2018

Extensions

More terms from T. D. Noe, Aug 08 2003

A086798 Number of coefficients equal to zero in n-th cyclotomic polynomial.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 3, 4, 0, 0, 2, 0, 0, 2, 7, 0, 4, 0, 4, 4, 0, 0, 6, 16, 0, 16, 6, 0, 2, 0, 15, 6, 0, 8, 10, 0, 0, 8, 12, 0, 4, 0, 10, 18, 0, 0, 14, 36, 16, 10, 12, 0, 16, 24, 18, 12, 0, 0, 10, 0, 0, 28, 31, 18, 6, 0, 16, 14, 8, 0, 22, 0, 0, 34, 18, 30, 8, 0, 28, 52, 0, 0, 16, 24, 0, 18, 30, 0
Offset: 1

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 05 2003

Keywords

References

Crossrefs

Cf. A051664 (number of nonzero terms in n-th cyclotomic polynomial).

Programs

  • Mathematica
    Table[Count[CoefficientList[Cyclotomic[n, x], x], _?(#==0&)], {n, 0, 100}]
  • PARI
    a(n)=sum(k=0,eulerphi(n),if(polcoeff(polcyclo(n),k),0,1))
    
  • PARI
    A086798(n) = (1 + eulerphi(n) - length(select(x->x!=0, Vec(polcyclo(n))))); \\ Antti Karttunen, Sep 21 2018

Formula

From Benoit Cloitre, Aug 06 2003: (Start)
a(4n+2) = a(2n+1); a(4n) = a(2n) + phi(2n).
When p is an odd prime and m integer >= 1: a(p^m) = a(2*p^m) = p^m - p^(m-1) - p + 1. In particular a(p) = a(2p) = 0. (End)
a(n) = 1 + phi(n) - A051664(n). - T. D. Noe, Aug 08 2003

Extensions

More terms from Benoit Cloitre and T. D. Noe, Aug 06 2003

A085459 Numbers k such that k-th cyclotomic polynomial has exactly 3 positive coefficients.

Original entry on oeis.org

3, 9, 10, 20, 27, 40, 50, 80, 81, 100, 160, 200, 243, 250, 320, 400, 500, 640, 729, 800, 1000, 1250, 1280, 1600, 2000, 2187, 2500, 2560, 3200, 4000, 5000, 5120, 6250, 6400, 6561, 8000, 10000, 10240, 12500, 12800, 16000, 19683, 20000, 20480, 25000, 25600
Offset: 1

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 14 2003

Keywords

Comments

Sequence appears to consist of 3^i, i > 0; and 2^i*5^j, i, j > 0. Are there any other terms? - David Wasserman, Feb 01 2005

Examples

			9 is a member because the 9th cyclotomic polynomial is P(x) = x^6+x^3+1.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 5000, Count[CoefficientList[Cyclotomic[#, x], x], ?(# > 0 &)] == 3 &] (* _Michael De Vlieger, Oct 26 2017 *)
  • PARI
    n = 0; while (1, n++; p = polcyclo(n, x); d = poldegree(p); c = 0; i = 0; while (c < 4 && i <= d, if (polcoeff(p, i) > 0, c++); i++); if (c == 3, print(n))); \\ David Wasserman, Feb 01 2005

Extensions

More terms from David Wasserman, Feb 01 2005
Showing 1-4 of 4 results.