OFFSET
1,2
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
FORMULA
G.f.: Sum_{k>0} k*(k+1)/2 * x^k / (1 + x^(3*k)).
a(n) = -Sum_{d|n, n/d==1 (mod 3)} (-1)^(n/d) * binomial(d+1,2).
MATHEMATICA
a[n_] := -DivisorSum[n, (-1)^(n/#) * Binomial[#+1, 2] &, Mod[n/#, 3] == 1 &]; Array[a, 100] (* Amiram Eldar, Jul 03 2023 *)
PROG
(PARI) a(n) = -sumdiv(n, d, (n/d%3==1)*(-1)^(n/d)*binomial(d+1, 2));
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jul 01 2023
STATUS
approved