%I #24 Apr 24 2021 09:56:21
%S 1,1,0,2,-2,2,0,2,-8,8,0,2,-12,2,0,32,-36,2,0,2,-20,58,0,2,-136,72,0,
%T 92,-28,2,0,2,-272,134,0,422,-288,2,0,184,-480,2,0,2,-44,1232,0,2,
%U -2360,926,0,308,-52,2,0,2004,-1176,382,0,2,-4064,2,0,6470,-5128,3642
%N G.f.: Sum_{n>=0} x^n/(1 + x^n)^n.
%H Seiichi Manyama, <a href="/A217670/b217670.txt">Table of n, a(n) for n = 0..10000</a> (terms 0..1000 from Paul D. Hanna)
%F a(4*n+2) = 0 for n>=0.
%F From _Seiichi Manyama_, Apr 23 2021: (Start)
%F a(n) = Sum_{d|n} (-1)^(d-1) * binomial(d+n/d-2, d-1) for n > 0.
%F If p is prime, a(p) = 1 + (-1)^(p-1). (End)
%e G.f.: A(x) = 1 + x + 2*x^3 - 2*x^4 + 2*x^5 + 2*x^7 - 8*x^8 + 8*x^9 +...
%e where
%e 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 +...
%t terms = 100; Sum[x^n/(1 + x^n)^n, {n, 0, terms}] + O[x]^terms // CoefficientList[#, x]& (* _Jean-François Alcover_, May 16 2017 *)
%o (PARI) {a(n)=polcoeff(sum(m=0, n, x^m/(1+x^m +x*O(x^n))^m), n)}
%o for(n=0, 100, print1(a(n), ", "))
%o (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
%Y Cf. A048272, A157019, A217668.
%K sign
%O 0,4
%A _Paul D. Hanna_, Oct 10 2012