OFFSET
0,6
COMMENTS
FORMULA
G.f.: G(t,z) = (t*z^2 - (1-z)^2 + sqrt((1+z^2-t*z^2)*(1-3*z^2-t*z^2)))/(2*z*(1-2*z+z^2-z^3-t*z^2+t*z^3)).
EXAMPLE
T(5,2)=3 because we have HUDUD, UDHUD, and UDUDH, where U=(1,1), D=(1,-1), H=(1,0).
Triangle starts:
1;
1;
1, 1;
1, 2;
2, 3, 1;
3, 4, 3;
5, 8, 6, 1;
7, 14, 10, 4;
MAPLE
G := ((t*z^2-(1-z)^2+sqrt((1+z^2-t*z^2)*(1-3*z^2-t*z^2)))*1/2)/(z*(1-2*z+z^2-z^3-t*z^2+t*z^3)): Gser := simplify(series(G, z = 0, 19)): for n from 0 to 16 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 16 do seq(coeff(P[n], t, k), k = 0 .. floor((1/2)*n)) end do; # yields sequence in triangular form
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, Jun 01 2011
STATUS
approved