login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A107748 Number of monic divisors of x^n - 1 with coefficients in {0,1,-1}. 3

%I #12 Aug 25 2017 03:00:58

%S 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,

%T 48,4,136,4,64,14,14,14,286,4,14,14,160,4,136,4,48,48,14,4,550,8,50,

%U 14,48,4,186,14,164,14,14,4,1124,4,14,48,128,14,136,4,48,14,136

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

%C Multiply by 2 to get all that have coefficients in {0,1,-1}.

%C 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}.

%C From _Robert Israel_, Aug 24 2017: (Start)

%C Each of these polynomials is a product of distinct cyclotomic polynomials C_k(x) for k dividing n.

%C a(n) <= 2^tau(n).

%C If n is prime then a(n)=4. (End)

%H Robert Israel, <a href="/A107748/b107748.txt">Table of n, a(n) for n = 1..719</a> (n=1..359 from Antti Karttunen)

%p f:= proc(n) local t, C, x, S;

%p C:= map(m -> numtheory:-cyclotomic(m, x), numtheory:-divisors(n) );

%p t:= 0:

%p S:= combinat:-subsets(C);

%p while not S[finished] do

%p if map(abs,{coeffs(expand(convert(S[nextvalue](), `*`)), x)}) = {1} then

%p t:= t+1;

%p fi

%p od;

%p t

%p end proc:

%p map(f, [$1..100]); # _Robert Israel_, Aug 24 2017

%o (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

%Y Cf. A107067, A067824.

%K nonn

%O 1,1

%A _W. Edwin Clark_, Jun 11 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)