%I #30 Aug 22 2018 11:56:03
%S 1,0,1,0,0,1,0,1,0,0,0,1,0,2,0,1,0,1,0,0,0,0,1,0,3,0,3,0,3,0,2,0,1,0,
%T 1,0,0,0,0,0,1,0,4,0,6,0,7,0,7,0,5,0,5,0,3,0,2,0,1,0,1,0,0,0,0,0,0,1,
%U 0,5,0,10,0,14,0,17,0,16,0,16,0,14,0,11,0,9,0,7,0,5,0,3,0,2,0,1,0,1,0,0,0,0
%N Triangle read by rows: T(n,k) is the number of Dyck paths of semilength n such that the area between the x-axis and the path is k (n>=0; 0<=k<=n^2).
%C Row n has n^2 + 1 terms.
%C Row sums are the Catalan numbers (A000108).
%C Sum(k*T(n,k), k=0..n^2) = A008549(n).
%C Sums along falling diagonals give A005169. - _Joerg Arndt_, Mar 29 2014
%C T(2n,4n) = A240008(n). - _Alois P. Heinz_, Mar 30 2014
%H Alois P. Heinz, <a href="/A129182/b129182.txt">Rows n = 0..32, flattened</a>
%F G.f.: G(t,z) given by G(t,z) = 1+t*z*G(t,t^2*z)*G(t,z).
%F Sum_{k=0..n^2} (n^2-k)/2 * T(n,k) = A139262(n). - _Alois P. Heinz_, Mar 31 2018
%e T(4,10) = 3 because we have UDUUUDDD, UUUDDDUD and UUDUDUDD.
%e Triangle starts:
%e 1;
%e 0,1;
%e 0,0,1,0,1;
%e 0,0,0,1,0,2,0,1,0,1;
%e 0,0,0,0,1,0,3,0,3,0,3,0,2,0,1,0,1;
%e 0,0,0,0,0,1,0,4,0,6,0,7,0,7,0,5,0,5,0,3,0,2,0,1,0,1;
%e Transposed triangle (A239927) begins:
%e 00: 1;
%e 01: 0, 1;
%e 02: 0, 0, 1;
%e 03: 0, 0, 0, 1;
%e 04: 0, 0, 1, 0, 1;
%e 05: 0, 0, 0, 2, 0, 1;
%e 06: 0, 0, 0, 0, 3, 0, 1;
%e 07: 0, 0, 0, 1, 0, 4, 0, 1;
%e 08: 0, 0, 0, 0, 3, 0, 5, 0, 1;
%e 09: 0, 0, 0, 1, 0, 6, 0, 6, 0, 1;
%e 10: 0, 0, 0, 0, 3, 0, 10, 0, 7, 0, 1;
%e 11: 0, 0, 0, 0, 0, 7, 0, 15, 0, 8, 0, 1;
%e 12: 0, 0, 0, 0, 2, 0, 14, 0, 21, 0, 9, 0, 1;
%e 13: 0, 0, 0, 0, 0, 7, 0, 25, 0, 28, 0, 10, 0, 1;
%e 14: 0, 0, 0, 0, 1, 0, 17, 0, 41, 0, 36, 0, 11, 0, 1;
%e 15: 0, 0, 0, 0, 0, 5, 0, 35, 0, 63, 0, 45, 0, 12, 0, 1;
%e 16: 0, 0, 0, 0, 1, 0, 16, 0, 65, 0, 92, 0, 55, 0, 13, 0, 1;
%e 17: 0, 0, 0, 0, 0, 5, 0, 40, 0, 112, 0, 129, 0, 66, 0, 14, 0, 1;
%e 18: 0, 0, 0, 0, 0, 0, 16, 0, 86, 0, 182, 0, 175, 0, 78, 0, 15, 0, 1;
%e 19: 0, 0, 0, 0, 0, 3, 0, 43, 0, 167, 0, 282, 0, 231, 0, 91, 0, 16, 0, 1;
%e 20: 0, 0, 0, 0, 0, 0, 14, 0, 102, 0, 301, 0, 420, 0, 298, 0, 105, 0, 17, 0, 1;
%e ... - _Joerg Arndt_, Mar 25 2014
%p G:=1/(1-t*z*g[1]): for i from 1 to 11 do g[i]:=1/(1-t^(2*i+1)*z*g[i+1]) od: g[12]:=0: Gser:=simplify(series(G,z=0,11)): for n from 0 to 7 do P[n]:=sort(coeff(Gser,z,n)) od: for n from 0 to 7 do seq(coeff(P[n],t,j),j=0..n^2) od; # yields sequence in triangular form
%p # second Maple program:
%p b:= proc(x, y) option remember; `if`(y<0 or y>x, 0, `if`(x=0, 1,
%p expand(b(x-1, y-1)*z^(y-1/2)+ b(x-1, y+1)*z^(y+1/2))))
%p end:
%p T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0)):
%p seq(T(n), n=0..10); # _Alois P. Heinz_, Mar 29 2014
%t b[x_, y_] := b[x, y] = If[y<0 || y>x, 0, If[x==0, 1, Expand[b[x-1, y-1]*z^(y-1/2) + b[x-1, y+1]*z^(y+1/2)]]]; T[n_] := Function[{p}, Table[Coefficient[p, z, i], {i, 0, Exponent[p, z]}]][b[2*n, 0]]; Table[T[n], {n, 0, 10}] // Flatten (* _Jean-François Alcover_, Mar 24 2015, after _Alois P. Heinz_ *)
%Y Cf. A000108, A008549, A139262, A240008, A143951 (column sums).
%K nonn,tabf
%O 0,14
%A _Emeric Deutsch_, Apr 08 2007