OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
FORMULA
G.f.: 1/(1-x-x^2/(1-x-x^2/(1-x-x^2/(1-x+x^2*(1-M(x)))))), where M(x) is the g.f. of Motzkin numbers A001006.
a(n) ~ 3^(n+7/2)/(98*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Apr 27 2015
EXAMPLE
For n=4 we have 9 paths: HHHH, UDUD, UHDH, HUHD, UHHD, UDHH, HUDH, HHUD and UUDD
MATHEMATICA
CoefficientList[Series[1/(1-x-x^2/(1-x-x^2/(1-x-x^2/(1-x+x^2*(1-(1-x-(1-2*x-3*x^2)^(1/2))/(2*x^2)))))), {x, 0, 30}], x] (* Vaclav Kotesovec, Apr 27 2015 *)
PROG
(PARI) x='x+O('x^50); Vec(1/(1-x-x^2/(1-x-x^2/(1-x-x^2/(1-x+x^2*(1-(1-x-(1-2*x-3*x^2)^(1/2))/(2*x^2))))))) \\ G. C. Greubel, Jun 03 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
José Luis Ramírez Ramírez, Apr 27 2015
STATUS
approved