A354595 a(n) = n^2 + 4*floor(n/2)^2.
0, 1, 8, 13, 32, 41, 72, 85, 128, 145, 200, 221, 288, 313, 392, 421, 512, 545, 648, 685, 800, 841, 968, 1013, 1152, 1201, 1352, 1405, 1568, 1625, 1800, 1861, 2048, 2113, 2312, 2381, 2592, 2665, 2888, 2965, 3200, 3281, 3528, 3613, 3872
Offset: 0
Links
- David Lovler, Table of n, a(n) for n = 0..10000
- Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
Crossrefs
Programs
-
Mathematica
a[n_] := n^2 + 4 Floor[n/2]^2 Table[a[n], {n, 0, 90}] (* A354595 *) LinearRecurrence[{1, 2, -2, -1, 1}, {0, 1, 8, 13, 32}, 60]
-
PARI
a(n) = n^2 + 4*(n\2)^2;
Formula
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5), n >= 5.
G.f.: x*(1 + 7*x + 3*x^2 + 5*x^3)/((1 - x)^3*(1 + x)^2).
E.g.f.: 2*x^2*cosh(x) + (1 + 2*x + 2*x^2)*sinh(x). - Stefano Spezia, Jun 07 2022
Comments