#This is a short Maple package accompanying Manuel Kauers and Doron Zeilberger's article #Counting Standard Young Tableaux With Restricted Runs #https://sites.math.rutgers.edu/~zeilberg/mamarim/mamarimhtml/cyt.html #The main procedures re SeqG(N) and SeqH(N) producing the two sequences discussed at the end of the paper Help:=proc(): print(`G(a,b,c), SeqG(N), H(a,b,c), SeqH(N), Zinn(List) `): end: ###start G sequence #G(a,b,c): the number of walks from [0,0,0] to [a,b,c] with unit positive steps in the cubic lattice staying in x>=y>=z #AND such that each run has length at least 2 G:=proc(a,b,c) option remember: G1(a,b,c)+G2(a,b,c)+G3(a,b,c): end: G1:=proc(a,b,c) local a1: option remember: if a<0 or b<0 or c<0 or a1 then 1: else add(G2(a1,b,c)+G3(a1,b,c) ,a1=b..a-2): fi: end: G2:=proc(a,b,c) local b1: option remember: if a<0 or b<0 or c<0 or a=y>=z #AND such that each run is ODD (i.e. NO even runs) H:=proc(a,b,c) option remember: H1(a,b,c)+H2(a,b,c)+H3(a,b,c): end: H1:=proc(a,b,c) local r1: option remember: if a<0 or b<0 or c<0 or a1 then RETURN(FAIL): fi: n1:=nops(resh)-1: s1:=sn(resh,n1): s2:=sn(resh,n1-1): theta:=evalf(2*(s1+s2)/(s1-s2)^2): mu:=evalf(sqrt(op(n1+1,resh)/op(n1-1,resh))*exp(-(s1+s2)/((s1-s2)*s1))): [theta,mu]: end: