%I #7 Dec 30 2022 17:05:45
%S 1,1,0,1,1,2,1,0,1,2,4,4,2,1,0,1,5,10,11,8,4,2,1,0,1,14,28,32,26,16,8,
%T 4,2,1,0,1,42,84,98,84,57,32,16,8,4,2,1,0,1,132,264,312,276,198,120,
%U 64,32,16,8,4,2,1,0,1,429,858,1023,924,687,438,247,128,64,32,16,8,4,2,1,0,1
%N Triangle read by rows: T(n,k) is the number of Dyck paths of semilength n for which height of first peak + height of last peak = k (n>=1; 2<=k<=2n).
%C Row n has 2n-1 terms. Column 2 yields the Catalan numbers (A000108). T(n,3)=2T(n,2) (n>=3). Sum(kT(n,k),k=2..2n)=2[Catalan(n+1)-Catalan(n)] (A071721). The trivariate g.f., with z marking semilength, t marking height of the first peak and s marking height of the last peak, is G = (1-tzC-szC+tsz^2*C^2+tsz^2*C)/[(1-tzC)(1-szC)(1-tsz)]-1.
%H Krishna Menon and Anurag Singh, <a href="https://arxiv.org/abs/2212.13794">Grassmannian permutations avoiding identity</a>, arXiv:2212.13794 [math.CO], 2022.
%F G.f.: (1-2tzC+t^2*z^2*C^2+t^2*z^2*C)/[(1-tzC)^2*(1-t^2*z)]-1, where C=[1-sqrt(1-4z)]/(2z) is the Catalan function.
%e T(5,6)=4 because we have UUDUUUDDDD, UUUDUDUDDD, UUUDDUUDDD and UUUUDDDUDD, where U=(1,1), D=(1,-1).
%e Triangle starts:
%e 1;
%e 1,0,1;
%e 1,2,1,0,1;
%e 2,4,4,2,1,0,1;
%e 5,10,11,8,4,2,1,0,1;
%e ...
%p C:=(1-sqrt(1-4*z))/2/z: g:=(1-2*t*z*C+t^2*z^2*C^2+t^2*z^2*C)/(1-t*z*C)^2/(1-t^2*z)-1: gser:=simplify(series(g,z=0,12)): for n from 1 to 10 do P[n]:=coeff(gser,z^n) od: for n from 1 to 10 do seq(coeff(P[n],t^j),j=2..2*n) od; # yields sequence in triangular form
%Y Cf. A000108, A071721.
%K nonn,tabf
%O 1,6
%A _Emeric Deutsch_, Dec 02 2005