login
Expansion of Sum_{k>=1} x^(2*k) / (1 + x^k)^2.
9

%I #22 Jun 22 2024 14:12:34

%S 0,1,-2,4,-4,4,-6,11,-10,6,-10,18,-12,8,-20,26,-16,13,-18,28,-28,12,

%T -22,48,-28,14,-36,38,-28,24,-30,57,-44,18,-44,62,-36,20,-52,74,-40,

%U 32,-42,58,-72,24,-46,110,-54,31,-68,68,-52,40,-68,100,-76,30,-58,116

%N Expansion of Sum_{k>=1} x^(2*k) / (1 + x^k)^2.

%H Seiichi Manyama, <a href="/A325940/b325940.txt">Table of n, a(n) for n = 1..10000</a>

%H Joerg Arndt, <a href="http://arxiv.org/abs/1202.6525">On computing the generalized Lambert series</a>, arXiv:1202.6525v3 [math.CA], (2012).

%F G.f.: Sum_{k>=2} (-1)^k * (k - 1) * x^k / (1 - x^k).

%F a(n) = Sum_{d|n} (-1)^d * (d - 1).

%F a(n) = A048272(n) - A002129(n).

%F Faster converging series: A(q) = Sum_{n >= 1} (-1)^n*q^(n^2)*((n-1)*q^(3*n) + n*q^(2*n) + (n-2)*q^n + n-1)/((1 + q^n)*(1 - q^(2*n))) - apply the operator t*d/dt to equation 1 in Arndt, then set t = -q and x = q. - _Peter Bala_, Jan 22 2021

%F a(n) = A128315(n, 2). - _G. C. Greubel_, Jun 22 2024

%t nmax = 60; CoefficientList[Series[Sum[x^(2 k)/(1 + x^k)^2, {k, 1, nmax}], {x, 0, nmax}], x] // Rest

%t Table[Sum[(-1)^d (d - 1), {d, Divisors[n]}], {n, 1, 60}]

%o (PARI) {a(n) = sumdiv(n, d, (-1)^d*(d-1))} \\ _Seiichi Manyama_, Sep 14 2019

%o (Magma)

%o A325940:= func< n | (&+[0^(n mod j)*(-1)^j*(j-1): j in [1..n]]) >;

%o [A325940(n): n in [1..70]]; // _G. C. Greubel_, Jun 22 2024

%o (SageMath)

%o def A325940(n): return sum(0^(n%j)*(-1)^j*(j-1) for j in range(1, n+1))

%o [A325940(n) for n in range(1,71)] # _G. C. Greubel_, Jun 22 2024

%Y Cf. A002129, A048272, A065608, A128315, A363615, A363616.

%K sign,look

%O 1,3

%A _Ilya Gutkovskiy_, Sep 09 2019