OFFSET
1,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
MAPLE
b:= proc(n, s, c) option remember; `if`(s<c, ceil(2^(n-1)),
`if`(n=0, 0, add(b(n-j, min(j, s), c+1), j=1..n)))
end:
a:= n-> b(n$2, 0):
seq(a(n), n=1..40); # Alois P. Heinz, Oct 01 2021
MATHEMATICA
b[n_, s_, c_] := b[n, s, c] = If[s < c, Ceiling[2^(n - 1)],
If[n == 0, 0, Sum[b[n - j, Min[j, s], c + 1], {j, 1, n}]]];
a[n_] := b[n, n, 0];
Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Apr 14 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
R. J. Mathar, Oct 01 2021
EXTENSIONS
a(23)-a(34) from Alois P. Heinz, Oct 01 2021
STATUS
approved