OFFSET
0,3
COMMENTS
A Grand Dyck-Motzkin path is a path in the half-plane x>=0, starting at (0,0), ending at (n,0) and consisting of steps U=(1,1), D=(1,-1) and H=(1,0), such that H-steps are only allowed if y<=0.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
L. Ferrari and E. Munarini, Enumeration of edges in some lattices of paths , arXiv:1203.6792 [math.CO], 2012.
FORMULA
G.f.: 1/(1-x-x^2*C(x^2)-x^2*M(x)), where C(x) is the g.f. of Catalan numbers and M(x) is the g.f. of Motzkin paths.
a(n) ~ (3+sqrt(5)) * 3^(n+3/2) / (4*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Apr 20 2015
EXAMPLE
For instance, for n=3, we have the 6 paths UDH, HUD, HDU, DUH, DHU, HHH.
MATHEMATICA
CoefficientList[Series[2/(Sqrt[1-4*x^2] + Sqrt[1-2*x-3*x^2] - x), {x, 0, 20}], x] (* Vaclav Kotesovec, Apr 20 2015 *)
PROG
(PARI) x='x+O('x^50); Vec(2/(sqrt(1-4*x^2) + sqrt(1-2*x-3*x^2) - x)) \\ G. C. Greubel, Mar 09 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
José Luis Ramírez Ramírez, Apr 19 2015
STATUS
approved