A100504 a(n) = (4*n^3 + 6*n^2 + 8*n + 6)/3.
2, 8, 26, 64, 130, 232, 378, 576, 834, 1160, 1562, 2048, 2626, 3304, 4090, 4992, 6018, 7176, 8474, 9920, 11522, 13288, 15226, 17344, 19650, 22152, 24858, 27776, 30914, 34280, 37882, 41728, 45826, 50184, 54810, 59712, 64898, 70376, 76154, 82240
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
Crossrefs
Cf. A037237.
Programs
-
Magma
I:=[2, 8, 26, 64]; [n le 4 select I[n] else 4*Self(n-1) -6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jun 26 2012
-
Mathematica
CoefficientList[Series[2*(1+3x^2)/((1-x)^4),{x,0,40}],x] (* Vincenzo Librandi, Jun 26 2012 *) LinearRecurrence[{4,-6,4,-1},{2,8,26,64},40] (* Harvey P. Dale, Dec 27 2015 *)
-
PARI
a(n)=n*(4*n^2+6*n+8)/3+2 \\ Charles R Greathouse IV, Jan 18 2012
-
SageMath
[2 + 2*n*(2*n^2+3*n+4)/3 for n in range(41)] # G. C. Greubel, Apr 03 2023
Formula
a(n) = a(n-1) + (2*n)^2 + 2. - Philippe Deléham, Jan 18 2012
From Vincenzo Librandi, Jun 26 2012: (Start)
G.f.: 2*(1+3*x^2)/(1-x)^4;
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). (End)
From G. C. Greubel, Apr 03 2023: (Start)
a(n) = 2 + 2*A037237(n-1).
E.g.f.: (2/3)*(3 + 9*x + 9*x^2 + 2*x^3)*exp(x). (End)
Extensions
More terms from Hugo Pfoertner, Nov 25 2004
New name based on formula from Ralf Stephan
Comments