%I #49 Dec 11 2022 14:28:38
%S 1,2,8,32,144,672,3264,16256,82688,427520,2240512,11874304,63533056,
%T 342712320,1861779456,10176823296,55932813312,308907737088,
%U 1713473323008,9541666209792,53322206674944,298943898451968
%N Number of walks of length n on one 60-degree wedge of the equilateral triangular lattice. The walk can go along the walls of the wedge, but cannot cross the walls.
%C Counts colored Motzkin paths where each of the steps has two possible colors. Series reversion of x/(1+2x+4x^2). - _Paul Barry_, Sep 04 2007
%C Hankel transform is 4^C(n+1,2). - _Paul Barry_, Oct 01 2009
%H Vincenzo Librandi, <a href="/A129400/b129400.txt">Table of n, a(n) for n = 0..300</a>
%H Alin Bostan, <a href="https://www-apr.lip6.fr/sem-comb-slides/IHP-bostan.pdf">Computer Algebra for Lattice Path Combinatorics</a>, Séminaire de Combinatoire Ph. Flajolet, March 28 2013.
%H Alin Bostan, <a href="https://specfun.inria.fr/bostan/HDR.pdf">Calcul Formel pour la Combinatoire des Marches</a> [The text is in English], Habilitation à Diriger des Recherches, Laboratoire d’Informatique de Paris Nord, Université Paris 13, December 2017.
%H Bostan, Alin ; Chyzak, Frédéric; van Hoeij, Mark; Kauers, Manuel; Pech, Lucien <a href="https://doi.org/10.1016/j.ejc.2016.10.010">Hypergeometric expressions for generating functions of walks with small steps in the quarter plane.</a> Eur. J. Comb. 61, 242-275 (2017)
%H Alin Bostan, Andrew Elvey Price, Anthony John Guttmann, and Jean-Marie Maillard, <a href="https://arxiv.org/abs/2001.00393">Stieltjes moment sequences for pattern-avoiding permutations</a>, arXiv:2001.00393 [math.CO], 2020.
%F a(n) = 2^n*A001006(n) = Sum_{k=0..floor(n/2)} C(n,2k)*C(k)*2^(n-2k)*2^k*2^k where C(n) = A000108(n). - _Paul Barry_, Sep 04 2007
%F G.f.: 1/(1-2x-4x^2/(1-2x-4x^2/(1-2x-4x^2/(1-2x-4x^2/(1-.... (continued fraction). - _Paul Barry_, Oct 01 2009
%F G.f.: (1/(8*x^2)) * (1-2*x-(1-4*x-12*x^2)^(1/2)). - _Mark van Hoeij_, Nov 02 2009
%F E.g.f.: a(n) = n! * [x^n] exp(2*x)*BesselI(1,4*x)/(2*x). - _Peter Luschny_, Aug 25 2012
%F Recurrence: (n+2)*a(n) = 2*(2*n+1)*a(n-1) + 12*(n-1)*a(n-2) . - _Vaclav Kotesovec_, Oct 20 2012
%F a(n) ~ 3*sqrt(3)*6^n/(2*sqrt(Pi)*n^(3/2)) . - _Vaclav Kotesovec_, Oct 20 2012
%F a(n) = 2^n*GegenbauerC(n, -n-1, -1/2)/(n+1). - _Peter Luschny_, May 09 2016
%F G.f.: A(x) = 1/(1 + 2*x)*c(2*x/(1 + 2*x))^2, where c(x) = (1 - sqrt(1 - 4*x))/(2*x) is the g.f. of the Catalan numbers A000108. Cf. A005572. - _Peter Bala_, Aug 18 2021
%e a(1) = 2 because we can go east or northeast.
%p countwalk2 := proc (i::integer, j::integer, n::integer) option remember: if n < 0 or j < 0 or i < j then 0 elif n = 0 and i = 0 and j = 0 then 1 elif n = 0 then 0 else procname(i-2, j, n-1)+procname(i+2, j, n-1)+procname(i-1, j+1, n-1)+procname(i+1, j+1, n-1)+procname(i+1, j-1, n-1)+procname(i-1, j-1, n-1) end if end proc: counter2 := proc (n::nonnegint) option remember: add(add(countwalk2(i, j, n), i = 0 .. 2*n), j = 0 .. n) end proc:
%p g := n -> simplify(2^n*GegenbauerC(n, -n-1, -1/2)/(n+1)):
%p seq(g(n), n=0..21); # _Peter Luschny_, May 09 2016
%p T := proc(n, k) option remember;
%p if n < 0 or k < 0 then 0
%p elif n = 0 then binomial(2*k, k)/(k+1)
%p else 2*(T(n-1, k+1) - T(n-1, k)) fi end:
%p a := n -> T(n, 1): seq(a(n), n=0..21); # _Peter Luschny_, Aug 23 2017
%t CoefficientList[Series[1/(8*x^2)*(1-2*x-Sqrt[1-4*x-12*x^2]), {x, 0, 20}], x] (* _Vaclav Kotesovec_, Oct 20 2012 *)
%Y Cf. A000108, A005572.
%K nonn,walk,easy
%O 0,2
%A Rebecca Xiaoxi Nie (rebecca.nie(AT)utoronto.ca), May 28 2007