OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..576
FORMULA
EXAMPLE
a(3) = 6: 3, 13, 1|3, 2|3, 13|2, 1|2|3.
MAPLE
b:= proc(n, m, i) option remember; `if`(n=0, 1, add(
`if`(i=j and j>0, 0, b(n-1, max(m, j), j)), j=0..m+1))
end:
a:= n-> b(n, 0$2)-`if`(n>0, b(n-1, 0$2), 0):
seq(a(n), n=0..30);
MATHEMATICA
b[n_, m_, i_] := b[n, m, i] = If[n == 0, 1, Sum[If[i == j && j > 0, 0, b[n-1, Max[m, j], j]], {j, 0, m+1}]];
a[n_] := b[n, 0, 0] - If[n > 0, b[n-1, 0, 0], 0];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Sep 18 2024, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Sep 08 2024
STATUS
approved