login
Triangle read by rows: T(n,k) is the number of Motzkin paths of length n and having k steps that touch the x-axis (1<=k<=n).
1

%I #3 Mar 30 2012 17:36:13

%S 1,0,2,0,1,3,0,2,2,5,0,4,4,5,8,0,9,8,11,10,13,0,21,18,24,23,20,21,0,

%T 51,42,57,52,49,38,34,0,127,102,139,126,117,98,71,55,0,323,254,349,

%U 312,294,244,193,130,89,0,835,646,893,792,750,630,502,371,235,144,0,2188,1670

%N Triangle read by rows: T(n,k) is the number of Motzkin paths of length n and having k steps that touch the x-axis (1<=k<=n).

%C Row sums yield the Motzkin numbers (A001006). T(n,2)=A001006(n-2) for n>=3. T(n,3)=2*A001006(n-3) for n>=4. T(n,n)=A000045(n+1) (the Fibonacci numbers). Sum(k*T(n,k),k=1..n)=A128098(n).

%F G.f.=2/[2-2tz-t^2+t^2*z+t^2*sqrt(1-2z-3z^2)]-1.

%e T(5,3)=4 because we have HU(HH)D, HU(UD)D, U(HH)DH and U(UD)DH, where U=(1,1), H=(1,0) and D=(1,-1) and the steps that do not touch the x-axis are shown between parentheses.

%e Triangle starts:

%e 1;

%e 0,2;

%e 0,1,3;

%e 0,2,2,5;

%e 0,4,4,5,8;

%e 0,9,8,11,10,13;

%e 0,21,18,24,23,20,21;

%p G:=2/(2-2*t*z-t^2+t^2*z+t^2*sqrt(1-2*z-3*z^2))-1: Gser:=simplify(series(G,z=0,14)): for n from 1 to 12 do P[n]:=sort(coeff(Gser,z,n)) od: for n from 1 to 12 do seq(coeff(P[n],t,j),j=1..n) od; # yields sequence in triangular form

%Y Cf. A001006, A000045, A128098.

%K nonn,tabl

%O 1,3

%A _Emeric Deutsch_, Feb 16 2007