OFFSET
0,5
COMMENTS
LINKS
A. Sapounakis, I. Tasoulas and P. Tsikouras, Counting strings in Dyck paths, Discrete Math., 307 (2007), 2909-2924.
FORMULA
G.f. G=G(t, z) satisfies G=1+z(C-z+tz)G, where C=[1-sqrt(1-4z)]/(2z) is the Catalan function. G=2/[1+2z^2-2tz^2+sqrt(1-4z)].
EXAMPLE
T(5,2)=3 because we have UUDDUUDDUD, UUDDUDUUDD and UDUUDDUUDD, where U=(1,1), D=(1,-1).
Triangle starts:
1;
1;
1,1;
3,2;
10,3,1;
31,8,3;
98,27,6,1; ...
MAPLE
C:=(1-sqrt(1-4*z))/2/z: eq:=G=1+z*(C-z+t*z)*G: G:=solve(eq, G): Gser:=simplify(series(G, z=0, 17)): P[0]:=1: for n from 1 to 15 do P[n]:=coeff(Gser, z^n) od: for n from 0 to 15 do seq(coeff(t*P[n], t^j), j=1..1+floor(n/2)) od; # yields sequence in triangular form
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, Nov 30 2005
STATUS
approved