OFFSET
0,4
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..10000 (terms 0..1000 from Paul D. Hanna)
FORMULA
a(4*n+2) = 0 for n>=0.
From Seiichi Manyama, Apr 23 2021: (Start)
a(n) = Sum_{d|n} (-1)^(d-1) * binomial(d+n/d-2, d-1) for n > 0.
If p is prime, a(p) = 1 + (-1)^(p-1). (End)
EXAMPLE
G.f.: A(x) = 1 + x + 2*x^3 - 2*x^4 + 2*x^5 + 2*x^7 - 8*x^8 + 8*x^9 +...
where
A(x) = 1 + x/(1+x) + x^2/(1+x^2)^2 + x^3/(1+x^3)^3 + x^4/(1+x^4)^4 + x^5/(1+x^5)^5 +...
MATHEMATICA
terms = 100; Sum[x^n/(1 + x^n)^n, {n, 0, terms}] + O[x]^terms // CoefficientList[#, x]& (* Jean-François Alcover, May 16 2017 *)
PROG
(PARI) {a(n)=polcoeff(sum(m=0, n, x^m/(1+x^m +x*O(x^n))^m), n)}
for(n=0, 100, print1(a(n), ", "))
(PARI) a(n) = if(n==0, 1, sumdiv(n, d, (-1)^(d-1)*binomial(d+n/d-2, d-1))); \\ Seiichi Manyama, Apr 23 2021
CROSSREFS
KEYWORD
sign
AUTHOR
Paul D. Hanna, Oct 10 2012
STATUS
approved