Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #31 Jan 04 2025 05:37:50
%S 0,0,1,-3,6,-9,15,-24,29,-30,45,-67,66,-63,98,-129,120,-117,153,-204,
%T 206,-165,231,-341,282,-234,354,-417,378,-354,435,-594,542,-408,582,
%U -770,630,-513,770,-966,780,-702,861,-1071,1072,-759,1035,-1527,1143,-930,1346
%N Expansion of Sum_{k>0} x^(3*k)/(1+x^k)^3.
%H Seiichi Manyama, <a href="/A363615/b363615.txt">Table of n, a(n) for n = 1..10000</a>
%F G.f.: -Sum_{k>0} binomial(k-1,2) * (-x)^k/(1 - x^k).
%F a(n) = -Sum_{d|n} (-1)^d * binomial(d-1,2).
%F a(n) = A128315(n, 3), for n >= 3. - _G. C. Greubel_, Jun 22 2024
%F a(n) = (A321543(n) - 3*A002129(n) + 2*A048272(n)) / 2. - _Amiram Eldar_, Jan 04 2025
%t a[n_] := -DivisorSum[n, (-1)^#*Binomial[# - 1, 2] &]; Array[a, 50] (* _Amiram Eldar_, Jul 18 2023 *)
%o (PARI) my(N=60, x='x+O('x^N)); concat([0, 0], Vec(sum(k=1, N, x^(3*k)/(1+x^k)^3)))
%o (PARI) a(n) = -sumdiv(n, d, (-1)^d*binomial(d-1, 2));
%o (Magma)
%o A363615:= func< n | -(&+[(-1)^d*Binomial(d-1,2): d in Divisors(n)]) >;
%o [A363615(n): n in [1..60]]; // _G. C. Greubel_, Jun 22 2024
%o (SageMath)
%o def A363615(n): return sum(0^(n%j)*(-1)^(j+1)*binomial(j-1,2) for j in range(1, n+1))
%o [A363615(n) for n in range(1,61)] # _G. C. Greubel_, Jun 22 2024
%Y Cf. A002129, A048272, A128315, A325940, A321543, A363610, A363616.
%K sign
%O 1,4
%A _Seiichi Manyama_, Jun 11 2023