OFFSET
0,1
COMMENTS
a(n) = 2^n-1 whenever n is prime. It seems as if a(n) >= A005420(n) for all n (checked up to 200), with equality for all 1<n<20 except {11,12,15} and whenever A005420(n)=2^n-1 (i.e., 2^n-1 is prime). - M. F. Hasler, Apr 30 2007
a(0) could also be 1. - T. D. Noe, Oct 29 2007
LINKS
MAPLE
[seq(Phi_pos_terms(j, 2)+Phi_neg_terms(j, 2), j=0..104)];
MATHEMATICA
a[n_] := FromDigits[ If[# != 0, 1, 0]& /@ CoefficientList[ Cyclotomic[n, x], x], 2]; a[0] = 2; Table[a[n], {n, 0, 38}] (* Jean-François Alcover, Dec 11 2012 *)
PROG
(PARI) A063670(n)=local(p=polcyclo(n+!n)); if(n, sum(i=0, n, (polcoeff(p, i)<>0)<<i), 2) \\ M. F. Hasler, Apr 30 2007
(PARI) a(n) = subst(apply(x->x!=0, polcyclo(n, 'x)), 'x, 2); \\ Gheorghe Coserea, Nov 04 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Aug 03 2001
STATUS
approved