OFFSET
0,3
LINKS
R. Flórez and J. L. Ramírez, Some enumerations on non-decreasing Motzkin paths, Australasian Journal of Combinatorics, 72(1) (2018), 138-154.
Index entries for linear recurrences with constant coefficients, signature (2,2,-3,0,1)
FORMULA
a(n) = 2*a(n-1) + 2*a(n-2) - 3*a(n-3) + a(n-5), a(0)=1, a(1)=1, a(2)=2, a(3)=4, a(4)=9.
G.f.: (x^3 - 2*x^2 - x + 1)/(1 - 2*x - 2*x^2 + 3*x^3 - x^5).
EXAMPLE
For n=6 we have 49 paths. Among the A001006(6) = 51 Motzkin paths, the following two paths are not nondecreasing Motzkin paths: UHUDDH and UUDHDH.
MATHEMATICA
LinearRecurrence[{2, 2, -3, 0, 1}, {1, 1, 2, 4, 9}, 40] (* Amiram Eldar, Dec 03 2018 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
José Luis Ramírez Ramírez, Dec 03 2018
STATUS
approved