OFFSET
0,5
COMMENTS
Row n has 1+floor(n/2) terms.
LINKS
Seiichi Manyama, Rows n = 0..200, flattened
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)].
Sum_{k=0..floor(n/2)} k*T(n,k) = A000108(n-1) (the Catalan numbers).
T(n,k) = Sum_{j=k..floor(n/2)} (-1)^(j-k) * (j+1) * binomial(j,k) * binomial(2*n-3*j+1,n-2*j)/(2*n-3*j+1). - Seiichi Manyama, Nov 06 2025
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
PROG
(PARI) T(n, k) = sum(j=k, n\2, (-1)^(j-k)*(j+1)*binomial(j, k)*binomial(2*n-3*j+1, n-2*j)/(2*n-3*j+1)); \\ Seiichi Manyama, Nov 06 2025
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, Nov 30 2005
STATUS
approved
