OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..250
EXAMPLE
a(2) = 3: 2, 1a1a, 1a1b.
a(3) = 7: 3, 21a, 1a1a1a, 1a1a1b, 1a1b1a, 1a1b1b, 1a1b1c.
MAPLE
f:= (n, k)-> add(Stirling2(n, j), j=0..k):
b:= proc(n, i, k) option remember; `if`(n=0 or i<2,
f(n, k), add(b(n-i*j, i-1, k), j=0..n/i))
end:
a:= n-> b(n$3):
seq(a(n), n=0..30);
MATHEMATICA
f[n_, k_] := Sum[StirlingS2[n, j], {j, 0, k}];
b[n_, i_, k_] := b[n, i, k] = If[n == 0 || i < 2, f[n, k], Sum[b[n - i*j, i - 1, k], {j, 0, n/i}]];
a[n_] := b[n, n, n];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 17 2018, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Sep 17 2017
STATUS
approved