OFFSET
0,2
COMMENTS
Hankel transform is A000012=[1,1,1,1,1,1,1,...].
a(n) is the number of Motzkin paths of length n in which the (1,0)-steps at level 0 come in 3 colors and there are no (1,0)-steps at a higher level. Example: a(3)=33 because, denoting U=(1,1), H=(1,0), and D=(1,-1), we have 3^3 = 27 paths of shape HHH, 3 paths of shape HUD, and 3 paths of shape UDH. - Emeric Deutsch, May 02 2011
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..1912
Isaac DeJager, Madeleine Naquin, Frank Seidl, Colored Motzkin Paths of Higher Order, VERUM 2019.
FORMULA
G.f.: 1/(1-3x-x^2/(1-x^2/(1-x^2/(1-x^2/(1-... (continued fraction). - Paul Barry, Mar 10 2009
G.f.: 2/(1 - 6*x + sqrt(1-4*x^2)). - Emeric Deutsch, May 02 2011
Conjecture: 3*(n+1)*a(n) +10*(-n-1)*a(n-1) +12*(-n+2)*a(n-2) +40*(n-2)*a(n-3)=0. - R. J. Mathar, Nov 26 2012
MAPLE
MATHEMATICA
With[{s = Partition[#, 2, 1] &@ Array[Sum[Binomial[#, Floor[k/2]]*3^(# - k), {k, 0, #}] &, 26, 0]}, Map[#2/2 - #1 & @@ # &, s]] (* Michael De Vlieger, Dec 15 2019 *)
CoefficientList[Series[2/(1-6*x+Sqrt[1-4*x^2]), {x, 0, 30}], x] (* G. C. Greubel, Jan 29 2020 *)
PROG
(PARI) my(x='x+O('x^30)); Vec( 2/(1 - 6*x + sqrt(1-4*x^2)) ) \\ G. C. Greubel, Jan 29 2020
(Magma) R<x>:=PowerSeriesRing(Rationals(), 30); Coefficients(R!( 2/(1 - 6*x + Sqrt(1-4*x^2)) )); // G. C. Greubel, Jan 29 2020
(Sage)
def A126931_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( 2/(1 - 6*x + sqrt(1-4*x^2)) ).list()
A126931_list(30) # G. C. Greubel, Jan 29 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Philippe Deléham, Mar 17 2007
EXTENSIONS
More terms from R. J. Mathar, Mar 25 2010
STATUS
approved