OFFSET
0,3
COMMENTS
Or, n^2 followed by -n. - Mohammad K. Azarian, Aug 29 2005
Also, +-A000217(m) + A000217(m-1) = 1+0, -1+0, 3+1, -3+1, 6+3, -6+3, ..., for m > 0. - Bruno Berselli, Jun 07 2013
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).
FORMULA
a(n) = (n^2 + 2*n + 2 + (n^2 + 6*n + 6)*(-1)^n)/8. - Bruno Berselli, Jun 07 2013
MATHEMATICA
LinearRecurrence[{0, 3, 0, -3, 0, 1}, {1, -1, 4, -2, 9, -3}, 60] (* Bruno Berselli, Jun 07 2013 *)
CoefficientList[Series[(1 - x + x^2 + x^3) / (1 - x^2)^3, {x, 0, 40}], x] (* Vincenzo Librandi, Jun 19 2013 *)
PROG
(Magma) /* By the second comment: */ A000217:=func<i | i*(i+1)/2>; [s*A000217(n)+A000217(n-1): s in [1, -1], n in [1..30]]; // Bruno Berselli, Jun 07 2013
CROSSREFS
KEYWORD
sign,easy
AUTHOR
STATUS
approved