login
Number of Motzkin paths of length n with no UD, UHD, UHHD, UHHHD, ..., starting at level zero (here H=(1,0), U=(1,1), D=(1,-1)).
1

%I #5 Jul 24 2022 12:04:53

%S 1,1,1,1,2,6,18,50,133,349,919,2443,6559,17759,48417,132765,365883,

%T 1012827,2814975,7852359,21977172,61697208,173688720,490222392,

%U 1386896799,3932313671,11172152779,31801604227,90683754826,259017103918

%N Number of Motzkin paths of length n with no UD, UHD, UHHD, UHHHD, ..., starting at level zero (here H=(1,0), U=(1,1), D=(1,-1)).

%F G.f.=2(1-z)/[1-2z+3z^2+(1-z)sqrt(1-2z-3z^2)].

%F D-finite with recurrence 2*(n+2)*a(n) +2*(-5*n-4)*a(n-1) +(13*n+2)*a(n-2) +(n-16)*a(n-3) +3*(-5*n+14)*a(n-4) +9*(n-4)*a(n-5)=0. - _R. J. Mathar_, Jul 24 2022

%e a(5)=6 because among the 21 Motzkin paths of length 5 only the following have

%e no U(H^p)D for any p>=0: HHHHH, HUUDD, UUDDH, UHUDD, UUDHD and UUHDD.

%Y Cf. A001006.

%K nonn

%O 0,5

%A _Emeric Deutsch_, Dec 27 2003