OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..500
MAPLE
b:= proc(n, i, k) option remember; `if`(i*(i+1)/2<n, 0,
`if`(n=0, 1, `if`(i<2, 0, b(n, i-1, `if`(i=k, 0, k)))+
`if`(i=k, 0, b(n-i, min(n-i, i-1), k)*binomial(n, i))))
end:
a:= n-> b(n$2, 0)*(n+1) -add(b(n$2, k), k=1..n):
seq(a(n), n=0..28);
MATHEMATICA
b[n_, i_, k_] := b[n, i, k] = If[i*(i + 1)/2 < n, 0,
If[n == 0, 1, If[i < 2, 0, b[n, i - 1, If[i == k, 0, k]]] +
If[i == k, 0, b[n - i, Min[n - i, i - 1], k]*Binomial[n, i]]]];
a[n_] := b[n, n, 0]*(n + 1) - Sum[b[n, n, k], {k, 1, n}];
Table[a[n], {n, 0, 28}] (* Jean-François Alcover, Mar 28 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Sep 28 2019
STATUS
approved