OFFSET
0,3
COMMENTS
a(n) counts generalized Tesler matrices. For the definition of Tesler matrices see A008608.
EXAMPLE
a(2) = 3: [1,1; 0,3], [2,0; 0,2], [0,2; 0,4].
MAPLE
b:= proc(n, i, l) option remember; (m-> `if`(m=0, 1,
`if`(i=0, b(l[1]+2, 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(2, n-1, [0$(n-1)]):
seq(a(n), n=0..10);
MATHEMATICA
b[n_, i_, l_] := b[n, i, l] = With[{m = Length[l]}, If[m == 0, 1,
If[i == 0, b[l[[1]] + 2, m - 1, ReplacePart[l, 1 -> Nothing]], Sum[
b[n - j, i - 1, ReplacePart[l, i -> l[[i]] + j]], {j, 0, n}]]]];
a[n_] := If[n <= 1, 1, b[2, n - 1, Array[0&, n - 1]]];
Table[Print[n, " ", a[n]]; a[n], {n, 0, 14}] (* Jean-François Alcover, May 17 2022, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 08 2015
STATUS
approved