Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #72 Nov 04 2022 10:46:57
%S 1,0,1,4,18,84,405,2004,10126,52048,271338,1431400,7627348,40994652,
%T 221984157,1209902388,6632482710,36544255968,202275553662,
%U 1124212840440,6271377279804,35102535960360,197081848211394,1109621661515016,6263608341803916
%N Number of 4-Motzkin paths of length n with no level steps at height 0.
%H G. C. Greubel, <a href="/A185132/b185132.txt">Table of n, a(n) for n = 1..1000</a>
%H Isaac DeJager, Madeleine Naquin, and Frank Seidl, <a href="https://www.valpo.edu/mathematics-statistics/files/2019/08/Drube2019.pdf">Colored Motzkin Paths of Higher Order</a>, VERUM 2019.
%H Rigoberto Flórez, Leandro Junes, and José L. Ramírez, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL21/Florez/florez4.html">Further Results on Paths in an n-Dimensional Cubic Lattice</a>, Journal of Integer Sequences, Vol. 21 (2018), Article 18.1.2.
%F G.f. (for offset 0): (1+4x-sqrt(1-8x+12x^2))/(2x^2+8x).
%F G.f. as continued fraction is 1/(1-0*x-x^2/(1-4*x-x^2/(1-4*x-x^2/(1-4*x-x^2/(.....
%F a(s) = Sum_{n=1..s}( Sum_{k=0..floor((s-2*n)/2)} 4^(s-2*n-2*k)*(n/(n+2*k))*binomial(n+2*k, k)*binomial(s-n-1, s-2*n-2*k) ) with s>=2.
%F D-finite with recurrence: 4*n*a(n) +(48-31n)*a(n-1) +4*(10n-33)*a(n-2) +12*(n-3)*a(n-3)=0. - _R. J. Mathar_, Jan 27 2012
%F a(n) ~ 3 * 6^(n-1/2) / (25*sqrt(Pi)*n^(3/2)). - _Vaclav Kotesovec_, Jan 31 2014
%F a(n) = 1/(n+1)*Sum_{j=0..floor(n/2)} 4^(n-2*j)*C(n+1,j)*C(n-j-1,n-2*j). - _Vladimir Kruchinin_, Apr 04 2019
%p with(LREtools): with(FormalPowerSeries): # requires Maple 2022
%p ogf:= (1+4*x-sqrt(1-8*x+12*x^2))/(2*x^2+8*x):
%p init:= [1, 0, 1, 4, 18, 84, 405, 2004];
%p iseq:= seq(u(i-1)=init[i],i=1..nops(init)): req:= FindRE(ogf,x,u(n));
%p rmin:= subs(n=n-4, MinimalRecurrence(req,u(n),{iseq})[1]); # Mathar's recurrence
%p a:= gfun:-rectoproc({rmin, iseq}, u(n), remember):
%p seq(a(n),n=0..24); # _Georg Fischer_, Nov 03 2022
%t CoefficientList[Series[(1+4*x-Sqrt[1-8*x+12*x^2])/(2*x^2+8*x), {x, 0, 20}], x] (* _Vaclav Kotesovec_, Jan 31 2014 *)
%o (PARI) x='x+O('x^50); Vec((1+4*x-sqrt(1-8*x+12*x^2))/(2*x^2+8*x)) \\ _G. C. Greubel_, Jun 23 2017
%Y Cf. A117641, A000957, A001006, A005043.
%K nonn
%O 1,4
%A _José Luis Ramírez Ramírez_, Jan 26 2012