[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Expansion of g.f. Sum_{k>0} k * x^k / (1 + (-x)^k)^2.
0

%I #10 Sep 05 2023 05:35:32

%S 1,4,6,4,10,24,14,0,27,40,22,24,26,56,60,-16,34,108,38,40,84,88,46,0,

%T 75,104,108,56,58,240,62,-64,132,136,140,108,74,152,156,0,82,336,86,

%U 88,270,184,94,-96,147,300,204,104,106,432,220,0,228,232,118,240,122,248,378,-192

%N Expansion of g.f. Sum_{k>0} k * x^k / (1 + (-x)^k)^2.

%F a(n) is multiplicative with a(2^e) = (3-e) * 2^e if e>0, a(p^e) = (e+1) * p^e if p>2.

%F a(16*n + 8) = 0.

%e x + 4*x^2 + 6*x^3 + 4*x^4 + 10*x^5 + 24*x^6 + 14*x^7 + 27*x^9 + 40*x^10 + ...

%t f[p_, e_] := (e+1) * p^e; f[2, e_] := (3-e) * 2^e; a[n_] := Times @@ f @@@ FactorInteger[n]; a[1] = 1; Array[a, 100] (* _Amiram Eldar_, Sep 05 2023 *)

%o (PARI) {a(n) = local(A, p, e); if( n<1, 0, A = factor(n); prod(k=1, matsize(A)[1], if(p = A[k, 1], e = A[k, 2]; if( p==2, (3-e), e+1) * p^e)))}

%o (PARI) {a(n) = if( n<1, 0, polcoeff( sum(k=1, n, k * x^k / (1 + (-x)^k)^2, x*O(x^n)), n))}

%Y A038040(2*n + 1) = a(2*n + 1). -16 * A038040(n) = a(16*n).

%K sign,easy,mult

%O 1,2

%A _Michael Somos_, Aug 22 2008