OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..60
FORMULA
a(n) = Sum_{k=0..floor((sqrt(1+8*n)-1)/2)} k * A317327(n,k).
MAPLE
b:= proc(u, o, t, s) option remember;
`if`(u+o=0, x^(nops(s union {t})-1),
add(b(u-j, o+j-1, 1, s union {t}), j=1..u)+
add(b(u+j-1, o-j, t+1, s), j=1..o))
end:
a:= n-> (p-> add(coeff(p, x, i)*i, i=0..degree(p)))(b(n, 0$2, {})):
seq(a(n), n=0..16);
MATHEMATICA
b[u_, o_, t_, s_] := b[u, o, t, s] =
If[u + o == 0, x^(Length[s ~Union~ {t}] - 1),
Sum[b[u - j, o + j - 1, 1, s ~Union~ {t}], {j, 1, u}] +
Sum[b[u + j - 1, o - j, t + 1, s], {j, 1, o}]];
a[n_] := Function[p, Sum[Coefficient[p, x, i]*i, {i, 0, Exponent[p, x]}]][
b[n, 0, 0, {}]];
Table[a[n], {n, 0, 16}] (* Jean-François Alcover, Apr 15 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 25 2018
STATUS
approved