OFFSET
1,2
COMMENTS
Also total sum of the sizes of all blocks with minimal element n in all set partitions of {1,2,...,2n-1}.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..200
Wikipedia, Partition of a set
EXAMPLE
a(2) = 4 = 0+2+1+0+1 = sum of the sizes of all blocks with maximal element 2 in all set partitions of {1,2,3}: 123, 12|3, 13|2, 1|23, 1|2|3.
MAPLE
b:= proc(n, m, t) option remember; `if`(n=0, [1, 0], add(
`if`(t=1 and j<>m+1, 0, (p->p+`if`(j=-t or t=1 and j=m+1,
[0, p[1]], 0))(b(n-1, max(m, j), `if`(t=1 and j=m+1, -j,
`if`(t<0, t, `if`(t>0, t-1, 0)))))), j=1..m+1))
end:
a:= n-> b(2*n-1, 0, n)[2]:
seq(a(n), n=1..20);
MATHEMATICA
b[n_, m_, t_] := b[n, m, t] = If[n==0, {1, 0}, Sum[If[t==1 && j != m+1, 0, Function[p, p+If[j == -t || t == 1 && j == m+1, {0, p[[1]]}, 0]][b[n-1, Max[m, j], If[t == 1 && j == m+1, -j, If[t<0, t, If[t>0, t-1, 0]]]]]], {j, 1, m+1}]]; a[n_] := b[2*n-1, 0, n][[2]]; Table[a[n], {n, 1, 20}] (* Jean-François Alcover, Feb 15 2017, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Mar 21 2016
STATUS
approved