login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A259919
Number of n X n upper triangular matrices (m_{i,j}) of nonnegative integers with 2 = Sum_{j=h..n} m_{h,j} - Sum_{i=1..h-1} m_{i,h} for all h in {1,...,n}.
1
1, 1, 3, 22, 351, 11275, 689146, 76718466, 15016410213, 5018597151979, 2793390337774000, 2534303740130716491, 3677548139455638020060, 8393668597786379602398164, 29683833854927200499142474520, 160463839044675821511377573062150, 1309702228155431081923017737636343876
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
Column k=2 of A259844.
Cf. A008608.
Sequence in context: A193193 A099750 A219268 * A275366 A196734 A271849
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jul 08 2015
STATUS
approved