A104631 Coefficient of x^(2n+1) in the expansion of (1+x+x^2+x^3+x^4)^n.
0, 1, 4, 18, 80, 365, 1686, 7875, 37080, 175725, 837100, 4004770, 19227924, 92599533, 447118140, 2163837030, 10492874384, 50972030189, 248000853348, 1208335275170, 5894873067200, 28791371852145, 140768761906190
Offset: 0
Examples
G.f. = x + 4*x^2 + 18*x^3 + 80*x^4 + 365*x^5 + 1686*x^6 + 7875*x^7 + ... - _Michael Somos_, Aug 12 2018
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..300
- Andrei G. Pronko, Periodic Motzkin chain: Ground states and symmetries, arXiv:2504.00835 [math-ph], 2025. See p. 16.
Programs
-
Magma
P
:=PolynomialRing(Integers()); [n eq 0 select 0 else Coefficients((1+x+x^2+x^3+x^4)^n)[2*n+2]: n in [0..22]]; // Bruno Berselli, Nov 17 2011 -
Mathematica
f=1; Table[f=Expand[f(x^4+x^3+x^2+x+1)]; Coefficient[f, x, 2n+1], {n, 30}]
-
PARI
x='x+O('x^30); concat([0], Vec(sqrt((5*x^2+2*x-1+(x+1)*sqrt(5*x^2-6*x+1))/(2*x*(1-x)*(5*x+4)*(5*x-1))))) \\ G. C. Greubel, Aug 12 2018
Formula
G.f.: sqrt((5*x^2+2*x-1+(x+1)*sqrt(5*x^2-6*x+1))/(2*x*(1-x)*(5*x+4)*(5*x-1))). - Mark van Hoeij, Nov 16 2011
From Vaclav Kotesovec, Oct 17 2012: (Start)
Recurrence: 2*(n-1)*(2*n+1)*a(n) = (19*n^2 - 19*n + 2)*a(n-1) + 5*(2*n^2 - 3*n - 1)*a(n-2) - 25*(n-2)*n*a(n-3).
a(n) ~ 5^n/(2*sqrt(Pi*n)). (End)
a(n) = n * A104632(n) for n>=0. - Michael Somos, Aug 12 2018
Comments