A330707 a(n) = ( 3*n^2 + n - 1 + (-1)^floor(n/2) )/4.
0, 1, 3, 7, 13, 20, 28, 38, 50, 63, 77, 93, 111, 130, 150, 172, 196, 221, 247, 275, 305, 336, 368, 402, 438, 475, 513, 553, 595, 638, 682, 728, 776, 825, 875, 927, 981, 1036, 1092, 1150, 1210, 1271, 1333, 1397, 1463
Offset: 0
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (3,-4,4,-3,1).
Crossrefs
Programs
-
Magma
[(3*n^2+n-1+ (-1)^Floor(n/2))/4: n in [0..60]]; // G. C. Greubel, Dec 30 2019
-
Maple
seq((3*n^2+n-1+sqrt(2)*sin((2*n+1)*Pi/4))/4, n = 0..60); # G. C. Greubel, Dec 30 2019
-
Mathematica
LinearRecurrence[{3,-4,4,-3,1}, {0,1,3,7,13}, 60] (* Amiram Eldar, Dec 27 2019 *)
-
PARI
concat(0, Vec(x*(1 + 2*x^2) / ((1 - x)^3*(1 + x^2)) + O(x^60))) \\ Colin Barker, Dec 27 2019
-
Sage
[(3*n^2+n-1+(-1)^floor(n/2))/4 for n in (0..60)] # G. C. Greubel, Dec 30 2019
Formula
a(n) = A231559(-n).
a(1+2*n) + a(2+2*n) = A033579(n+1).
a(40+n) - a(n) = 1210, 1270, 1330, 1390, 1450, ... . See 10*A016921(n).
From Colin Barker, Dec 27 2019: (Start)
G.f.: x*(1 + 2*x^2) / ((1 - x)^3*(1 + x^2)).
a(n) = 3*a(n-1) - 4*a(n-2) + 4*a(n-3) - 3*a(n-4) + a(n-5) for n>4.
(End)
E.g.f.: (cos(x) + sin(x) + (-1 + 4*x + 3*x^2)*exp(x))/4. - Stefano Spezia, Dec 27 2019
a(n) = ( 3*n^2 + n - 1 + sqrt(2)*sin((2*n+1)*Pi/4) )/4 = ( 3*n^2 + n - 1 + (-1)^floor(n/2) )/4. - G. C. Greubel, Dec 30 2019
Comments