OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..500
FORMULA
a(n) = A261835(n,n).
MAPLE
b:= proc(n, i, p, k) option remember;
`if`(i*(i+1)/2<n, 0, `if`(n=0, p!, b(n, i-1, p, k)+
`if`(i>n, 0, b(n-i, i-1, p+1, k)*binomial(i+k-1, k-1))))
end:
a:= n-> b(n$2, 0, n):
seq(a(n), n=0..30);
MATHEMATICA
b[n_, i_, p_, k_] := b[n, i, p, k] =
If[i (i + 1)/2 < n, 0, If[n == 0, p!, b[n, i - 1, p, k] +
If[i > n, 0, b[n - i, i - 1, p + 1, k]*Binomial[i + k - 1, k - 1]]]];
a[n_] := b[n, n, 0, n];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jul 12 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Sep 02 2015
STATUS
approved