OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..574
Wikipedia, Partition of a set
FORMULA
EXAMPLE
a(3) = 22 = 3 + 4 + 4 + 5 + 6, summing block indices 111, 112, 121, 122, 123 of the 5 partitions of [3]: 123, 12|3, 13|2, 1|23, 1|2|3.
MAPLE
b:= proc(n, m) option remember; `if`(n=0, [1, 0], add(
(p-> p+[0, p[1]*j])(b(n-1, max(m, j))), j=1..m+1))
end:
a:= n-> b(n, 0)[2]:
seq(a(n), n=0..25);
MATHEMATICA
b[n_, m_] := b[n, m] = If[n == 0, {1, 0}, Sum[
Function[p, p+{0, p[[1]]*j}][b[n-1, Max[m, j]]], {j, 1, m+1}]];
a[n_] := b[n, 0][[2]];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Apr 27 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Aug 02 2021
STATUS
approved