OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..385
FORMULA
a(n) = Sum_{k=1..n} k * A347999(n,k).
EXAMPLE
a(2) = 7 = 2 + 2 + 1 + 2: 11, 22, 12, 21.
MAPLE
g:= proc(n) option remember; add(n^(n-j)*(n-1)!/(n-j)!, j=1..n) end:
b:= proc(n, m) option remember; `if`(n=0, x^m, add(
b(n-i, min(m, i))*g(i)*binomial(n-1, i-1), i=1..n))
end:
a:= n-> (p-> add(coeff(p, x, i)*i, i=0..n))(b(n, n)):
seq(a(n), n=0..23);
MATHEMATICA
g[n_] := g[n] = Sum[n^(n - j)*(n - 1)!/(n - j)!, {j, 1, n}];
b[n_, m_] := b[n, m] = If[n == 0, x^m, Sum[
b[n - i, Min[m, i]]*g[i]*Binomial[n - 1, i - 1], {i, 1, n}]];
a[n_] := Function[p, Sum[Coefficient[p, x, i]*i, {i, 0, n}]][b[n, n]];
Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Apr 27 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Dec 17 2021
STATUS
approved