%I #35 Sep 08 2022 08:45:48
%S 1,0,1,1,2,4,9,21,51,127,323,835,2188,5798,15511,41835,113634,310572,
%T 853467,2356779,6536382,18199284,50852019,142547559,400763223,
%U 1129760415,3192727797,9043402501,25669818476,73007772802,208023278209
%N Expansion of (3 -x -sqrt(1-2*x-3*x^2))/2.
%C A variant of the Motzkin numbers A001006. Hankel transform is A168050.
%C Essentially the same as A086246. - _R. J. Mathar_, Dec 20 2011
%C Alternatively, this sequence corresponds to the number of positive walks with n steps {-1,0,1} starting at the origin, ending at altitude 1, and staying strictly above the x-axis. - _David Nguyen_, Dec 01 2016
%H Vincenzo Librandi, <a href="/A168049/b168049.txt">Table of n, a(n) for n = 0..200</a>
%H C. Banderier, C. Krattenthaler, A. Krinik, D. Kruchinin, V. Kruchinin, D. Nguyen, and M. Wallner, <a href="https://arxiv.org/abs/1609.06473">Explicit formulas for enumeration of lattice paths: basketball and the kernel method</a>, arXiv:1609.06473 [math.CO], 2016.
%F D-finite with recurrence: n*a(n) +(3-2n)*a(n-1) +3(3-n)*a(n-2)=0. - _R. J. Mathar_, Dec 20 2011
%F 0 = a(n)*(+9*a(n+1) + 15*a(n+2) - 12*a(n+3)) + a(n+1)*(-3*a(n+1) + 10*a(n+2) - 5*a(n+3)) + a(n+2)*(+a(n+2) + a(n+3)) if n>0. - _Michael Somos_, Jan 31 2014
%F a(n) ~ 3^(n+1/2) / (6*sqrt(Pi)*n^(3/2)). - _Vaclav Kotesovec_, Feb 12 2014
%F G.f.: 1 + x^2/(1 - x - x^2/(1 - x - x^2/(1 - x - x^2/(1 - ...)))), a continued fraction. - _Ilya Gutkovskiy_, Sep 23 2017
%e G.f. = 1 + x^2 + x^3 + 2*x^4 + 4*x^5 + 9*x^6 + 21*x^7 + 51*x^8 + ... - _Michael Somos_, Sep 26 2018
%t CoefficientList[Series[(3-x-Sqrt[1-2*x-3*x^2])/2, {x, 0, 20}], x] (* _Vaclav Kotesovec_, Feb 12 2014 *)
%o (PARI) Vec((3-x-sqrt(1-2*x-3*x^2))/2) \\ _Charles R Greathouse IV_, Dec 01 2016
%o (Magma) m:=30; R<x>:=PowerSeriesRing(Rationals(), m); Coefficients(R!((3 -x - Sqrt(1-2*x-3*x^2))/2)); // _G. C. Greubel_, Sep 25 2018
%Y Cf. A001006, A086246, A168050, A168051.
%K easy,nonn
%O 0,5
%A _Paul Barry_, Nov 17 2009