OFFSET
0,2
COMMENTS
LINKS
Bruno Berselli, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
MATHEMATICA
Table[(n (6 n + 1) + (n + 2) (-1)^n)/2, {n, 0, 50}]
CoefficientList[Series[(1 + x + 11 x^2 + 9 x^3 + 2 x^4) / ((1 + x)^2 (1 - x)^3), {x, 0, 50}], x] (* Vincenzo Librandi, Aug 19 2013 *)
LinearRecurrence[{1, 2, -2, -1, 1}, {1, 2, 15, 26, 53}, 70] (* Harvey P. Dale, Jul 03 2019 *)
PROG
(Magma) [(n*(6*n+1)+(n+2)*(-1)^n)/2: n in [0..50]];
(Magma) I:=[1, 2, 15, 26, 53]; [n le 5 select I[n] else Self(n-1)+2*Self(n-2)-2*Self(n-3)-Self(n-4)+Self(n-5): n in [1..50]]; // Vincenzo Librandi, Aug 19 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Sep 21 2010 - Sep 25 2010
STATUS
approved