login
A190159
Number of peakless Motzkin paths of length n and having no uhh...hd's starting at level 0, where u = (1, 1), h = (1, 0) and d = (1, -1).
2
1, 1, 1, 1, 1, 2, 6, 17, 44, 107, 252, 588, 1376, 3245, 7717, 18485, 44535, 107796, 261937, 638673, 1562105, 3831655, 9423580, 23233536, 57412612, 142174255, 352770105, 876922947, 2183621209, 5446177428, 13603846132, 34028890577, 85234251090, 213760737693, 536733871490, 1349210120198
OFFSET
0,6
COMMENTS
Can be easily expressed using RNA secondary structure terminology.
LINKS
FORMULA
a(n) = A098071(n,0).
G.f.=G=G(z) satisfies aG^2 + bG + c = 0, where a=z^2*(1-z-z^2+2z^3), b=-(1-z)(1-2z+2z^2+z^3), c=(1-z)^2.
G.f.: ((1 - x)/(2*x^2*(1 - x - x^2 + 2*x^3)))*(1 - 2*x + 2*x^2 + x^3 - sqrt((1 - 2*x + 2*x^2 + x^3)^2 - 4*x^2*(1 - x - x^2 + 2*x^3))). - G. C. Greubel, Oct 22 2018
D-finite with recurrence -(n+5)*(n+3)*(n-9)*a(n) +(-n^3-17*n^2-15*n+96)*a(n-1) +3*(7*n^3-43*n^2-20*n-40)*a(n-2) +(34*n^3-214*n^2+357*n-450)*a(n-3) -2*(n-3)*(8*n^2-48*n+183)*a(n-4) +(34*n^3-398*n^2+1461*n-1332)*a(n-5) +3*(7*n^3-83*n^2+220*n+196)*a(n-6) +(-n^3+35*n^2-327*n+822)*a(n-7) -(n-11)*(n+3)*(n-9)*a(n-8)=0. - R. J. Mathar, Jul 24 2022
EXAMPLE
a(5)=2 because among the 8 (=A004148(5)) peakless Motzkin paths of length 5 only hhhhh and uuhdd have no subword of type uhh...hd starting at level 0.
MAPLE
eq := z^2*(-z^2+2*z^3-z+1)*G^2-(1-z)*(z^3+2*z^2-2*z+1)*G+(1-z)^2 = 0: g := RootOf(eq, G): Gser := series(g, z=0, 40): seq(coeff(Gser, z, n), n=0..35);
MATHEMATICA
With[{a = x^2*(1 - x - x^2 + 2*x^3)}, CoefficientList[Series[((1 - x)/(2*a))*(1 - 2*x + 2*x^2 + x^3 - Sqrt[(1 - 2*x + 2*x^2 + x^3)^2 - 4*a]), {x, 0, 40}], x]] (* G. C. Greubel, Oct 22 2018 *)
PROG
(PARI) x='x+O('x^40); Vec(((1-x)/(2*x^2*(1-x-x^2+2*x^3)))*(1-2*x+2*x^2 + x^3 - sqrt((1-2*x+2*x^2+x^3)^2 -4*x^2*(1-x-x^2+2*x^3)))) \\ G. C. Greubel, Oct 22 2018
(Magma) m:=40; R<x>:=PowerSeriesRing(Rationals(), m); Coefficients(R!(((1 -x)/(2*x^2*(1 -x -x^2 +2*x^3)))*(1 -2*x +2*x^2 +x^3 -Sqrt((1-2*x+2*x^2 + x^3)^2 -4*x^2*(1 -x -x^2 +2*x^3))))); // G. C. Greubel, Oct 22 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, May 05 2011
STATUS
approved