OFFSET
1,5
COMMENTS
FORMULA
T(n, k)=(k+1)*sum(binomial(2*n-k+1-2*j, n-j+1)/(2*n-k-2*j+1), j=1..n-k) if 1<=k<=n-1; T(n, 0)=1. G.f. = (1-tz)/[(1-z)(1-tzC)]-1 where C=[1-sqrt(1-4z)]/(2z) is the Catalan function.
EXAMPLE
T(4,2)=4 because we have UD(UU)DDUD, UD(UU)DUDD, UUD(UU)DDD and UUDD(UU)DD (second ascent shown between parentheses).
MAPLE
T:=proc(n, k) if k=0 then 1 elif k<=n-1 then (k+1)*sum(binomial(2*n-k+1-2*j, n-j+1)/(2*n-k-2*j+1), j=1..n-k) else 0 fi end: for n from 1 to 12 do seq(T(n, k), k=0..n-1) od; # yields sequence in triangular form
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Emeric Deutsch, Nov 20 2005
STATUS
approved