OFFSET
0,3
COMMENTS
In each step at least one part is replaced by the partition of itself into smaller parts. The parts are not resorted.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..300
Wikipedia, Partition (number theory)
EXAMPLE
a(3) = 9 = 1 + 2 + 3 + 3, counting the (final) parts in: 3, 3->21, 3->111, 3->21->111.
a(4) = 45: 4, 4->31, 4->22, 4->211, 4->1111, 4->31->211, 4->31->1111, 4->22->112, 4->22->211, 4->22->1111, 4->211->1111, 4->31->211->1111, 4->22->112->1111, 4->22->211->1111.
MAPLE
b:= proc(n, i, k) option remember; `if`(n=0, [1, 0],
`if`(k=0, [1, 1], `if`(i<2, 0, b(n, i-1, k))+
(h-> (f-> f +[0, f[1]*h[2]/h[1]])(h[1]*
b(n-i, min(n-i, i), k)))(b(i$2, k-1))))
end:
a:= n-> add(add(b(n$2, i)[2]*(-1)^(k-i)*
binomial(k, i), i=0..k), k=0..n-1):
seq(a(n), n=0..25);
MATHEMATICA
b[n_, i_, k_] := b[n, i, k] = If[n == 0, {1, 0}, If[k == 0, {1, 1}, If[i < 2, 0, b[n, i - 1, k]] + Function[h, Function[f, f + {0, f[[1]] h[[2]]/ h[[1]]}][h[[1]] b[n - i, Min[n - i, i], k]]][b[i, i, k - 1]]]];
a[n_] := Sum[b[n, n, i][[2]] (-1)^(k - i) Binomial[k, i], {k, 0, n - 1}, {i, 0, k}];
a /@ Range[0, 25] (* Jean-François Alcover, May 01 2020, after Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Sep 20 2019
STATUS
approved