OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..22
EXAMPLE
a(2) = 3: [1,0; 0,1], [0,1; 0,0], [0,1; 0,2].
MAPLE
b:= proc(n, i, l) option remember; (m-> `if`(m=0, 1,
`if`(i=0, b(l[1]+1, m-1, subsop(1=NULL, l))+
`if`(l[1]=0, 0, b(l[1]-1, m-1, subsop(1=NULL, l))),
add(b(n-j, i-1, subsop(i=l[i]+j, l)), j=0..n))))(nops(l))
end:
a:= n-> b(1, n-1, [0$(n-1)]):
seq(a(n), n=0..14);
MATHEMATICA
b[n_, i_, l_] := b[n, i, l] = With[{m = Length[l]}, If[m == 0, 1, If[i == 0, b[l[[1]] + 1, m - 1, ReplacePart[l, 1 -> Nothing]] + If[l[[1]] == 0, 0, b[l[[1]] - 1, m - 1, ReplacePart[l, 1 -> Nothing]]], Sum[b[n - j, i - 1, ReplacePart[l, i -> l[[i]] + j]], {j, 0, n}]]]];
a[n_] := b[1, n - 1, Table[0, {n - 1}]];
Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Nov 18 2023, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 12 2015
STATUS
approved