OFFSET
1,4
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
FORMULA
G.f.: -Sum_{k>0} binomial(k-1,2) * (-x)^k/(1 - x^k).
a(n) = -Sum_{d|n} (-1)^d * binomial(d-1,2).
a(n) = A128315(n, 3), for n >= 3. - G. C. Greubel, Jun 22 2024
MATHEMATICA
a[n_] := -DivisorSum[n, (-1)^#*Binomial[# - 1, 2] &]; Array[a, 50] (* Amiram Eldar, Jul 18 2023 *)
PROG
(PARI) my(N=60, x='x+O('x^N)); concat([0, 0], Vec(sum(k=1, N, x^(3*k)/(1+x^k)^3)))
(PARI) a(n) = -sumdiv(n, d, (-1)^d*binomial(d-1, 2));
(Magma)
A363615:= func< n | -(&+[(-1)^d*Binomial(d-1, 2): d in Divisors(n)]) >;
[A363615(n): n in [1..60]]; // G. C. Greubel, Jun 22 2024
(SageMath)
def A363615(n): return sum(0^(n%j)*(-1)^(j+1)*binomial(j-1, 2) for j in range(1, n+1))
[A363615(n) for n in range(1, 61)] # G. C. Greubel, Jun 22 2024
CROSSREFS
KEYWORD
sign
AUTHOR
Seiichi Manyama, Jun 11 2023
STATUS
approved