OFFSET
5,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 5..1000
MAPLE
b:= proc(n, m, l) option remember; `if`(n=0, 1,
add(b(n-1, max(m, j), [subsop(1=NULL, l)[],
`if`(j<=m, 0, j)]), j={l[], m+1} minus {0}))
end:
A:= (n, k)-> `if`(n=0, 1, `if`(k<2, k, b(n, 0, [0$(k-1)]))):
a:= n-> (k-> A(n, k) -`if`(k=0, 0, A(n, k-1)))(5):
seq(a(n), n=5..50);
MATHEMATICA
b[n_, m_, l_List] := b[n, m, l] = If[n == 0, 1, Sum[b[n - 1, Max[m, j], Append[ReplacePart[l, 1 -> Nothing], If[j <= m, 0, j]]], {j, Append[l, m + 1]~Complement~{0}}]];
A[n_, k_] := If[n == 0, 1, If[k < 2, k, b[n, 0, Array[0 &, k - 1]]]];
a[n_] := With[{k = 5}, A[n, k] - If[k == 0, 0, A[n, k - 1]]];
a /@ Range[5, 35] (* Jean-François Alcover, Dec 08 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Oct 15 2018
STATUS
approved