OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..5000
Wikipedia, Partition of a set
FORMULA
MAPLE
b:= proc(n, i, k) option remember; `if`(i*(i+1)/2<n, 0,
`if`(n=0, k, b(n, i-1, k)+(t-> b(n-i, t, k)*k
+b(n-i, t, k+1))(min(n-i, i-1))))
end:
a:= n-> b(n$2, 0):
seq(a(n), n=0..50);
MATHEMATICA
b[n_, i_, k_] := b[n, i, k] = If[i(i+1)/2 < n, 0, If[n==0, k, b[n, i-1, k] + b[n-i, #, k] k + b[n-i, #, k+1]&[Min[n-i, i-1]]]];
a[n_] := b[n, n, 0];
a /@ Range[0, 50] (* Jean-François Alcover, May 08 2020, after Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Dec 29 2019
STATUS
approved