login
Number of Motzkin paths of length n with all ascents ending at even heights.
2

%I #17 Feb 09 2018 03:24:37

%S 1,1,1,1,2,5,12,27,60,135,309,716,1673,3935,9311,22154,52977,127255,

%T 306913,742918,1804301,4395371,10737206,26296601,64555741,158825720,

%U 391551973,967118177,2392964346,5930752193,14721605128,36595817145,91096419441,227054764556,566615061751,1415614697677,3540584874294,8864485647609

%N Number of Motzkin paths of length n with all ascents ending at even heights.

%H Robert Israel, <a href="/A299270/b299270.txt">Table of n, a(n) for n = 0..2416</a>

%H Yan Zhuang, <a href="https://arxiv.org/abs/1508.02793">A generalized Goulden-Jackson cluster method and lattice path enumeration</a>, arXiv:1508.02793 [math.CO], 2015.

%H Yan Zhuang, <a href="https://doi.org/10.1016/j.disc.2017.09.004">"A generalized Goulden-Jackson cluster method and lattice path enumeration</a>, Discrete Mathematics 341.2 (2018): 358-379.

%F G.f.: (1-2*x+2*x^2-sqrt(1-4*x+4*x^2-4*x^4+4*x^5))/(2*(x^2-x^3+x^4)).

%F (6+4*n)*a(n) + (-18-8*n)*a(n+1) + (18+8*n)*a(2+n) + 12*a(n+3) + (-54-8*n)*a(n+4) + (9*n+63)*a(n+5) + (-39-5*n)*a(n+6) + (9+n)*a(n+7) = 0. - _Robert Israel_, Feb 09 2018

%p f := gfun:-rectoproc({(6+4*n)*a(n)+(-18-8*n)*a(n+1)+(18+8*n)*a(2+n)+12*a(n+3)+(-54-8*n)*a(n+4)+(9*n+63)*a(n+5)+(-39-5*n)*a(n+6)+(9+n)*a(n+7), a(0) = 1, a(1) = 1, a(2) = 1, a(3) = 1, a(4) = 2, a(5) = 5, a(6) = 12}, a(n), remember):

%p map(f, [$0..100]);# _Robert Israel_, Feb 09 2018

%t CoefficientList[Series[(1 - 2 x + 2 x^2 - Sqrt[1 - 4 x + 4 x^2 - 4 x^4 + 4 x^5]) / (2 (x^2 - x^3 + x^4)), {x, 0, 40}], x] (* _Vincenzo Librandi_, Feb 09 2018 *)

%Y Cf. A299271.

%K nonn

%O 0,5

%A _N. J. A. Sloane_, Feb 08 2018