OFFSET
0,5
FORMULA
G.f.= 2/[1-z+2z^2-2tz^2+sqrt(1-2z-3z^2)].
EXAMPLE
Triangle begins:
1;
1;
1,1;
2,2;
5,3,1;
12,6,3;
Row n has 1+floor(n/2) terms.
T(5,2)=3 because H(UD)(UD), (UD)H(UD), (UD)(UD)H are the only Motzkin paths of length 5 with 2 peaks at height 1 (shown between parentheses); here U=(1,1),
H=(1,0) and D=(1,-1).
MAPLE
G := 2/(1-z+sqrt(1-2*z-3*z^2)+2*z^2-2*z^2*t): Gser:=simplify(series(G, z=0, 16)): P[0]:=1: for n from 1 to 15 do P[n]:=sort(coeff(Gser, z^n)) od: seq(seq(coeff(t*P[n], t^k), k=1..1+floor(n/2)), n=0..15);
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, Aug 30 2004
STATUS
approved