OFFSET
0,5
LINKS
EXAMPLE
a(6) = 3 because we have [21], [15, 6] and [6, 15].
MAPLE
b:= proc(n, i, p) option remember; (t->
`if`(t*(i+2)/3<n, 0, `if`(n=0, p!, b(n, i-1, p)+
`if`(t>n, 0, b(n-t, i-1, p+1)))))((i*(i+1)/2))
end:
a:= n-> b(n*(n+1)/2, n, 0):
seq(a(n), n=0..37); # Alois P. Heinz, Jan 31 2020
MATHEMATICA
b[n_, i_, p_] := b[n, i, p] = With[{t = i(i+1)/2}, If[t(i+2)/3 < n, 0, If[n == 0, p!, b[n, i-1, p] + If[t > n, 0, b[n-t, i-1, p+1]]]]];
a[n_] := b[n(n+1)/2, n, 0];
a /@ Range[0, 37] (* Jean-François Alcover, Nov 17 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jan 31 2020
EXTENSIONS
More terms from Alois P. Heinz, Jan 31 2020
STATUS
approved