|
|
A256943
|
|
Number of Grand Dyck-Motzkin paths of length n.
|
|
1
|
|
|
1, 1, 3, 6, 16, 38, 100, 254, 674, 1772, 4760, 12783, 34745, 94692, 260040, 716546, 1984984, 5517179, 15396331, 43094834, 121008580, 340686763, 961686971, 2720893669, 7715273753, 21921047638, 62401862460, 177948692666, 508289340032, 1454107965549
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|