OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..200
Wikipedia, Partition of a set
FORMULA
a(n) = A270236(2n+1,n+1).
a(n) ~ 2^(2*n+1/2) * n^(n-1/2) / (sqrt(Pi*(1-c)) * exp(n) * c^(n+1) * (2-c)^n), where c = -A226775 = -LambertW(-2*exp(-2)) = 0.4063757399599599... . - Vaclav Kotesovec, Mar 19 2016
EXAMPLE
a(1) = 5 = 0+1+1+2+1 = sum of the sizes of the second blocks in all A000110(3) = 5 set partitions of 3: 123, 12|3, 13|2, 1|23, 1|2|3.
MAPLE
b:= proc(n, m, k) option remember; `if`(n=0, [1, 0], add((p->p+
`if`(j=k, [0, p[1]], 0))(b(n-1, max(m, j), k)), j=1..m+1))
end:
a:= n-> b(2*n+1, 0, n+1)[2]:
seq(a(n), n=0..20);
MATHEMATICA
b[n_, m_, k_] := b[n, m, k] = If[n == 0, {1, 0}, Sum[# + If[j == k, {0, #[[1]]}, 0]&[b[n - 1, Max[m, j], k]], {j, 1, m + 1}]];
a[n_] := b[2*n + 1, 0, n + 1][[2]];
Table[a[n], {n, 0, 20}] (* Jean-François Alcover, May 23 2018, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Mar 18 2016
STATUS
approved