OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
EXAMPLE
a(4) = 11: (1)111, (1)1(2), (1)(2)1, (2)11, (2)2, (1)(3), (3)1, (4).
MAPLE
b:= proc(n, m, c) option remember; `if`(n=0, c, add(
b(n-j, max(m, j), c+`if`(j>m, 1, 0)), j=1..n))
end:
a:= n-> b(n, -1, 0):
seq(a(n), n=0..50);
MATHEMATICA
b[n_, m_, c_] := b[n, m, c] = If[n == 0, c, Sum[
b[n - j, Max[m, j], c + If[j > m, 1, 0]], {j, 1, n}]];
a[n_] := b[n, -1, 0];
Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Mar 04 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 22 2020
STATUS
approved