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.

A107748 Number of monic divisors of x^n - 1 with coefficients in {0,1,-1}.

Original entry on oeis.org

2, 4, 4, 8, 4, 14, 4, 16, 8, 14, 4, 48, 4, 14, 14, 32, 4, 50, 4, 48, 14, 14, 4, 162, 8, 14, 16, 48, 4, 136, 4, 64, 14, 14, 14, 286, 4, 14, 14, 160, 4, 136, 4, 48, 48, 14, 4, 550, 8, 50, 14, 48, 4, 186, 14, 164, 14, 14, 4, 1124, 4, 14, 48, 128, 14, 136, 4, 48, 14, 136
Offset: 1

Views

Author

W. Edwin Clark, Jun 11 2005

Keywords

Comments

Multiply by 2 to get all that have coefficients in {0,1,-1}.
Note that many of these are equal to 2^tau(n), where tau(n) is the number of positive divisors of n = number of irreducible factors of x^n - 1. This is connected with the fact that for small values of n the coefficients of the n-th cyclotomic polynomial belong to {0,1,-1}.
From Robert Israel, Aug 24 2017: (Start)
Each of these polynomials is a product of distinct cyclotomic polynomials C_k(x) for k dividing n.
a(n) <= 2^tau(n).
If n is prime then a(n)=4. (End)

Crossrefs

Programs

  • Maple
    f:= proc(n) local t, C, x, S;
      C:= map(m -> numtheory:-cyclotomic(m, x), numtheory:-divisors(n) );
      t:= 0:
      S:= combinat:-subsets(C);
      while not S[finished] do
      if map(abs,{coeffs(expand(convert(S[nextvalue](), `*`)), x)}) = {1} then
        t:= t+1;
      fi
    od;
    t
    end proc:
    map(f, [$1..100]); # Robert Israel, Aug 24 2017
  • PARI
    for(n=1, 359, m=0; p=x^n-1; nE=numdiv(n); P=factor(p); E=P[, 2]; P=P[, 1]; forvec(v=vector(nE, i, [0, E[i]]), divp=prod(k=1, nE, P[k]^v[k]); m++; for(j=0, poldegree(divp), divpcof=polcoeff(divp, j); if(divpcof<-1 || divpcof>1, m--; break))); write("b107748.txt", n, " ", m)); \\ Antti Karttunen, Aug 24 2017, after Herman Jamke's PARI-program for A107067