A174595 a(n) = 5*n^2/8 - n + 1/2 + (-1)^n*(-3*n^2/8 + n - 1/2).
0, 0, 1, 4, 4, 16, 9, 36, 16, 64, 25, 100, 36, 144, 49, 196, 64, 256, 81, 324, 100, 400, 121, 484, 144, 576, 169, 676, 196, 784, 225, 900, 256, 1024, 289, 1156, 324, 1296, 361, 1444, 400, 1600, 441, 1764, 484, 1936, 529, 2116, 576, 2304, 625, 2500, 676, 2704, 729, 2916, 784, 3136, 841, 3364, 900
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (0,3,0,-3,0,1).
Programs
-
Magma
[5*n^2/8-n+1/2+(-1)^n*(-3*n^2/8+n-1/2): n in [0..60]]; // Vincenzo Librandi, Aug 04 2011
-
Mathematica
LinearRecurrence[{0,3,0,-3,0,1},{0,0,1,4,4,16},70] (* Harvey P. Dale, Jun 26 2012 *) CoefficientList[Series[1/8 E^-x (-4 - 5 x - 3 x^2 + E^(2 x) (4 - 3 x + 5 x^2)), {x, 0, 50}], x]*Table[k!, {k, 0, 50}] (* Stefano Spezia, Nov 02 2018 *)
-
PARI
vector(50, n, n--; (5*n^2 -8*n + 4 - (-1)^n*(3*n^2 - 8*n +4))/8) \\ G. C. Greubel, Nov 02 2018
Formula
a(n) = A029578(n)^2.
G.f.: -x^2*(4*x+1)*(x^2+1) / ( (x-1)^3*(1+x)^3 ).
a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6).
E.g.f.: (1/8)*exp(-x)*(- 4 - 5*x - 3*x^2 +exp(2*x)*(4 - 3*x + 5*x^2)). - Stefano Spezia, Nov 02 2018
Comments