A325940 Expansion of Sum_{k>=1} x^(2*k) / (1 + x^k)^2.
0, 1, -2, 4, -4, 4, -6, 11, -10, 6, -10, 18, -12, 8, -20, 26, -16, 13, -18, 28, -28, 12, -22, 48, -28, 14, -36, 38, -28, 24, -30, 57, -44, 18, -44, 62, -36, 20, -52, 74, -40, 32, -42, 58, -72, 24, -46, 110, -54, 31, -68, 68, -52, 40, -68, 100, -76, 30, -58, 116
Offset: 1
Links
- Seiichi Manyama, Table of n, a(n) for n = 1..10000
- Joerg Arndt, On computing the generalized Lambert series, arXiv:1202.6525v3 [math.CA], (2012).
Programs
-
Magma
A325940:= func< n | (&+[0^(n mod j)*(-1)^j*(j-1): j in [1..n]]) >; [A325940(n): n in [1..70]]; // G. C. Greubel, Jun 22 2024
-
Mathematica
nmax = 60; CoefficientList[Series[Sum[x^(2 k)/(1 + x^k)^2, {k, 1, nmax}], {x, 0, nmax}], x] // Rest Table[Sum[(-1)^d (d - 1), {d, Divisors[n]}], {n, 1, 60}]
-
PARI
{a(n) = sumdiv(n, d, (-1)^d*(d-1))} \\ Seiichi Manyama, Sep 14 2019
-
SageMath
def A325940(n): return sum(0^(n%j)*(-1)^j*(j-1) for j in range(1, n+1)) [A325940(n) for n in range(1,71)] # G. C. Greubel, Jun 22 2024
Formula
G.f.: Sum_{k>=2} (-1)^k * (k - 1) * x^k / (1 - x^k).
a(n) = Sum_{d|n} (-1)^d * (d - 1).
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
a(n) = A128315(n, 2). - G. C. Greubel, Jun 22 2024
Comments