|
|
A257519
|
|
Number of Motzkin paths of length n with no peaks at level 4.
|
|
1
|
|
|
1, 1, 2, 4, 9, 21, 51, 127, 322, 827, 2145, 5607, 14751, 39020, 103713, 276848, 741901, 1995340, 5384554, 14576673, 39579527, 107776557, 294283193, 805649528, 2211176173, 6083560542, 16776970140, 46372110274, 128456563024, 356600559820, 991986172469, 2765030171165, 7722156349298, 21607098380159
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
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.
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|