The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A053441 Moments of generalized Motzkin paths. 1
 1, 0, 4, 4, 16, 24, 71, 128, 328, 650, 1552, 3232, 7437, 15904, 35884, 77840, 173792, 379896, 843411, 1851264, 4097552, 9014038, 19918944, 43871360, 96860441, 213472064, 471086932, 1038595100, 2291372912, 5052682904, 11145821407, 24580005376, 54217564504, 119573069218 (list; graph; refs; listen; history; text; internal format)
 OFFSET 2,3 LINKS Harvey P. Dale, Table of n, a(n) for n = 2..1000 R. A. Sulanke, Moments of generalized Motzkin paths, J. Integer Sequences, Vol. 3 (2000), #00.1. Index entries for linear recurrences with constant coefficients, signature (0,4,2,0,0,-1). FORMULA G.f.: x^2*(2*x^3+1)/((1+x)*(1+x-x^2)*(1-2*x-x^3)). a(2)=1, a(3)=0, a(4)=4, a(5)=4, a(6)=16, a(7)=24, a(n) = 4*a(n-2) + 2*a(n-3) - a(n-6). - Harvey P. Dale, Oct 24 2011 MATHEMATICA Drop[CoefficientList[Series[x^2(2x^3+1)/((1+x)(1+x-x^2)(1-2x-x^3)), {x, 0, 40}], x], 2] (* or *) LinearRecurrence[{0, 4, 2, 0, 0, -1}, {1, 0, 4, 4, 16, 24}, 40] (* Harvey P. Dale, Oct 24 2011 *) PROG (PARI) x='x+O('x^30); Vec(x^2*(2*x^3+1)/((1+x)*(1+x-x^2)*(1-2*x-x^3))) \\ G. C. Greubel, May 26 2018 (MAGMA) I:=[1, 0, 4, 4, 16, 24]; [n le 6 select I[n] else 4*Self(n-2) + 2*Self(n-3) -Self(n-6): n in [1..30]]; // G. C. Greubel, May 26 2018 CROSSREFS Sequence in context: A223819 A082649 A156232 * A065732 A092959 A330054 Adjacent sequences:  A053438 A053439 A053440 * A053442 A053443 A053444 KEYWORD nonn,easy,nice AUTHOR N. J. A. Sloane, Jan 12 2000 EXTENSIONS More terms from Reiner Martin (reinermartin(AT)hotmail.com), Oct 13 2002 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 5 21:18 EDT 2020. Contains 336213 sequences. (Running on oeis4.)