[seqfan] Re: Motzkin n-paths avoiding even-numbered steps that are up steps.

Peter Luschny peter.luschny at gmail.com
Thu Aug 2 18:09:41 CEST 2012


DS> ... the interleaving of the closely related sequences A109081 and A106228.
DS>  1,1,1,2,3,6,10,21,37,80,146,322,602,1347,...

DS> f[n_,x_,y_]:=f[n,x,y] = If[x>n||y<0,0,If[x==n&&y==0,1, If[EvenQ[x],0,
DS> If[y>n-x-1,0,f[n,x+1,y+1]]] +If[y<=0,0,f[n,x+1,y-1]] + f[n,x+1,y]]];

Also with the generalized hypergeometric function 3_F_2 for n>0

(n//2)^(1-n%2)*hyp3f2(-(n//2),-(n//2)+1-2*(n%2),n//2+n%2+1,(3-n%2)/2,(4-n%2)/2,1/4).

n//2 = floor(n/2)

Peter



More information about the SeqFan mailing list