login
A082645
a(n) = floor((2*n^2 + n - 4)/4).
1
-1, -1, 1, 4, 8, 12, 18, 25, 33, 41, 51, 62, 74, 86, 100, 115, 131, 147, 165, 184, 204, 224, 246, 269, 293, 317, 343, 370, 398, 426, 456, 487, 519, 551, 585, 620, 656, 692, 730, 769, 809, 849, 891, 934, 978, 1022, 1068, 1115, 1163, 1211, 1261, 1312, 1364, 1416, 1470, 1525
OFFSET
0,4
FORMULA
From Colin Barker, Jul 23 2017: (Start)
G.f.: -(1 - x - 2*x^2 - x^3 - 2*x^4 + x^5) / ((1 - x)^3*(1 + x)*(1 + x^2)).
a(n) = 2*a(n-1) - a(n-2) + a(n-4) - 2*a(n-5) + a(n-6) for n>5.
(End)
MAPLE
A082645:=n->floor((2*n^2+n-4)/4): seq(A082645(n), n=0..100); # Wesley Ivan Hurt, Jul 23 2017
MATHEMATICA
Table[Floor[(2 n^2 + n - 4)/4], {n, 0, 55}] (* Michael De Vlieger, Jul 22 2017 *)
LinearRecurrence[{2, -1, 0, 1, -2, 1}, {-1, -1, 1, 4, 8, 12}, 60] (* Harvey P. Dale, Jan 02 2023 *)
PROG
(PARI) a(n) = (2*n^2 + n - 4)\4; \\ Michel Marcus, Jul 23 2017
(PARI) Vec(-(1 - x - 2*x^2 - x^3 - 2*x^4 + x^5) / ((1 - x)^3*(1 + x)*(1 + x^2)) + O(x^100)) \\ Colin Barker, Jul 23 2017
CROSSREFS
Sequence in context: A311639 A311640 A311641 * A111201 A311642 A311643
KEYWORD
sign,easy
AUTHOR
N. J. A. Sloane, May 16 2003
STATUS
approved