OFFSET
0,7
COMMENTS
FORMULA
T(n,k) = c(n-k) - c(n-k-1), where c(n) = binomial(2n, n)/(n+1) is the n-th Catalan number. G.f. = (1-z)*C/(1-tz), where C = (1-sqrt(1-4z))/(2z) is the Catalan function.
EXAMPLE
T(5,2)=3 because we have UDUDUUDDUD, UDUDUUDUDD and UDUDUUUDDD, where U=(1,1), D=(1,-1).
Triangle begins:
1;
0, 1;
1, 0, 1;
3, 1, 0, 1;
9, 3, 1, 0, 1;
28, 9, 3, 1, 0, 1;
MAPLE
T:=proc(n, k) local c: c:=n->binomial(2*n, n)/(n+1): if k<n then c(n-k)-c(n-k-1) elif k=n then 1 else 0 fi end: for n from 0 to 12 do seq(T(n, k), k=0..n) od; # yields sequence in triangular form
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Emeric Deutsch, Dec 08 2005
STATUS
approved