%I #106 Mar 03 2024 17:23:10
%S 1,2,7,40,357,4820,96030,2766572,113300265,6499477726,515564231770,
%T 55908184737696,8203615387086224,1613808957720017838,
%U 422045413500096791377,145606442599303799948900,65801956684134601408784992,38698135339344702725297294600,29437141738828506134939056167071,28800381656420765181010517468370560
%N Number of n X n upper triangular matrices A of nonnegative integers such that a_1i + a_2i + ... + a_{i-1,i} - a_ii - a_{i,i+1} - ... - a_in = -1.
%C Garsia and Haglund call these Tesler matrices. - _N. J. A. Sloane_, Jul 04 2014
%C This is also the value of the type A_n Kostant partition function evaluated at (1,1,...,1,-n) in ZZ^(n+1). This is the number of ways of writing the vector (1,1,...,1,-n) in ZZ^(n+1) as a linear combination with nonnegative integer coefficients of the vectors e_i - e_j, for 1 <= i<j <= n+1. - _Alejandro H. Morales_, Mar 11 2014
%H Joel B. Lewis, <a href="/A008608/b008608.txt">Table of n, a(n) for n = 1..26</a> (first 23 terms from Jay Pantone)
%H D. Armstrong, A. Garsia, J. Haglund, B. Rhoades and B. Sagan, <a href="https://www.math.upenn.edu/~jhaglund/preprints/TeslerMatrices.pdf">Combinatorics of Tesler matrices in the theory of parking functions and diagonal harmonics</a>, J. of Combin., 3(3):451-494, 2012.
%H W. Baldoni and M. Vergne, <a href="http://webusers.imj-prg.fr/~michele.vergne/publications/kostant.pdf">Kostant partitions functions and flow polytopes</a>, Transform. Groups, 13(3-4):447-469, 2008.
%H J. Haglund, <a href="http://www.math.upenn.edu/~jhaglund/preprints/poly3.pdf">A polynomial expression for the Hilbert series of the quotient ring of diagonal coinvariants</a>.
%H J. Haglund and A. Garsia, <a href="http://www.math.upenn.edu/~jhaglund/preprints/formula2.pdf">A polynomial expression for the character of diagonal harmonics</a>, 2013.
%H A. Garsia and J. Haglund, <a href="http://www.math.upenn.edu/~jhaglund/preprints/formula3.pdf">A polynomial expression for the character of diagonal harmonics, 2014.
%H Ricky I. Liu, K. Mészáros, and A. H. Morales, <a href="http://arxiv.org/abs/1610.08370">Flow polytopes and the space of diagonal harmonics</a>, arXiv preprint arXiv:1610.08370 [math.CO], 2016.
%H K. Mészáros, A. H. Morales, and B. Rhoades, <a href="http://arxiv.org/abs/1409.8566">The polytope of Tesler matrices</a>, arXiv preprint arXiv:1409.8566 [math.CO], 2014.
%H Jason O'Neill, <a href="https://arxiv.org/abs/1702.00866">On the poset and asymptotics of Tesler Matrices</a>, arXiv:1702.00866 [math.CO], 2017.
%H Michèle Vergne et al., <a href="http://people.math.jussieu.fr/~vergne/work/BBCV/partitionfunction.zip">Maple programs</a> for efficient computation of the Kostant partition function.
%e For n = 3 there are seven matrices: [[1,0,0],[0,1,0],[0,0,1]], [[1,0,0],[0,0,1],[0,0,2]], [[0,0,1],[0,1,0],[0,0,2]], [[0,0,1],[0,0,1],[0,0,3]], [[0,1,0],[0,2,0],[0,0,1]], [[0,1,0],[0,1,1],[0,0,2]], [[0,1,0],[0,0,2],[0,0,3]], so a(3) = 7. - _Alejandro H. Morales_, Jul 03 2015
%p multcoeff:=proc(n,f,coeffv,k)
%p local i,currcoeff;
%p currcoeff:=f;
%p for i from 1 to n do
%p currcoeff:=`if`(coeffv[i]=0,coeff(series(currcoeff, x[i],k),x[i],0), coeff(series(currcoeff,x[i],k),x[i]^coeffv[i]));
%p end do;
%p return currcoeff;
%p end proc:
%p F:=n->mul(mul((1-x[i]*x[j]^(-1))^(-1),j=i+1..n),i=1..n):
%p a := n -> multcoeff(n+1,F(n+1),[seq(1,i=1..n),-n],n+2):
%p seq(a(i),i=2..7) # _Alejandro H. Morales_, Mar 11 2014, Jun 28 2015
%p # second Maple program:
%p b:= proc(n, i, l) option remember; (m-> `if`(m=0, 1,
%p `if`(i=0, b(l[1]+1, m-1, subsop(1=NULL, l)), add(
%p b(n-j, i-1, subsop(i=l[i]+j, l)), j=0..n))))(nops(l))
%p end:
%p a:= n-> b(1, n-1, [0$(n-1)]):
%p seq(a(n), n=1..14); # _Alois P. Heinz_, Jul 05 2015
%t b[n_, i_, l_List] := b[n, i, l] = Function[{m}, If[m==0, 1, If[i==0, b[l[[1]]+1, m-1, ReplacePart[l, 1 -> Sequence[]]], Sum[b[n-j, i-1, ReplacePart[l, i -> l[[i]] + j]], {j, 0, n}]]]][Length[l]]; a[n_] := b[1, n-1, Array[0&, n-1]]; Table[a[n], {n, 1, 14}] (* _Jean-François Alcover_, Jul 16 2015, after _Alois P. Heinz_ *)
%Y Cf. A259485, A259666.
%Y Row sums of A259786.
%Y Main diagonal (shifted) of A259841.
%Y Column k=1 of A259844.
%K nonn
%O 1,2
%A Glenn P. Tesler (gptesler(AT)euclid.ucsd.edu)
%E a(7)-a(13) from _Alejandro H. Morales_, Mar 12 2014
%E a(14) from _Alejandro H. Morales_, Jun 04 2015
%E a(15)-a(22) from _Alois P. Heinz_, Jul 05 2015