OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..576
Wikipedia, Partition of a set
FORMULA
a(n) = Sum_{k=1..ceiling(n/2)} k * A350647(n,k).
EXAMPLE
a(3) = 5 = 3*1 + 2*2: 321, 3|21, 3|2|1; 31|2.
a(4) = 11 = 7*1 + 2*2: 4321, 43|21, 43|2|1, 421|3, 4|321, 4|32|1, 41|3|2; 431|2, 41|32.
MAPLE
b:= proc(n, m) option remember; `if`(n=0, [1, 0], add((p->p+
[0, `if`(j=n, p[1], 0)])(b(n-1, max(j, m))), j=1..m+1))
end:
a:= n-> b(n, 0)[2]:
seq(a(n), n=0..30);
MATHEMATICA
b[n_, m_] := b[n, m] = If[n == 0, {1, 0}, Sum[Function[p, p + {0, If[j == n, p[[1]], 0]}][b[n - 1, Max[j, m]]], {j, 1, m + 1}]];
a[n_] := b[n, 0][[2]];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jan 11 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jan 09 2022
STATUS
approved