A109193 Triangle read by rows: T(n,k) is number of Grand Motzkin paths of length n having k returns to the x-axis (i.e., d or u steps hitting the x-axis).
1, 1, 1, 2, 1, 6, 1, 14, 4, 1, 30, 20, 1, 64, 68, 8, 1, 140, 196, 56, 1, 318, 524, 248, 16, 1, 750, 1356, 888, 144, 1, 1828, 3476, 2832, 784, 32, 1, 4576, 8932, 8448, 3344, 352, 1, 11700, 23136, 24248, 12368, 2272, 64, 1, 30420, 60528, 68120, 41808, 11232, 832, 1
Offset: 0
Examples
T(4,2)=4 because we have udud, dudu, uddu and duud, where u=(1,1), d=(1,-1), h=(1,0). Triangle begins: 1; 1; 1, 2; 1, 6; 1, 14, 4; 1, 30, 20; 1, 64, 68, 8;
Programs
-
Maple
M:=(1-z-sqrt(1-2*z-3*z^2))/2/z^2: G:=1/(1-z-2*t*z^2*M): Gser:=simplify(series(G,z=0,17)): P[0]:=1: for n from 1 to 14 do P[n]:=coeff(Gser,z^n) od: for n from 0 to 14 do seq(coeff(t*P[n],t^k),k=1..1+floor(n/2)) od; # yields sequence in triangular form
Comments