OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..345
Wikipedia, Partition of a set
FORMULA
a(n) = A285362(2n+1,n+1).
EXAMPLE
a(1) = 12 because the sum of the entries in the second blocks of all set partitions of [3] (123, 12|3, 13|2, 1|23, 1|2|3) is 0+3+2+5+2 = 12.
MAPLE
a:= proc(h) option remember; local b; b:=
proc(n, m) option remember;
`if`(n=0, [1, 0], add((p-> `if`(j=h+1, p+ [0,
(2*h-n+2)*p[1]], p))(b(n-1, max(m, j))), j=1..m+1))
end: b(2*h+1, 0)[2]
end:
seq(a(n), n=0..20);
MATHEMATICA
a[h_] := a[h] = Module[{b}, b[0, _] = {1, 0}; b[n_, m_] := b[n, m] = Sum[ If[j == h + 1, # + {0, (2*h - n + 2)*#[[1]]}, #]&[b[n - 1, Max[m, j]]], {j, 1, m + 1}]; b[2*h + 1, 0][[2]]];
Table[a[n], {n, 0, 20}] (* Jean-François Alcover, May 23 2018, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Apr 18 2017
STATUS
approved