OFFSET
0,3
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,1,-4,1,2,-1).
FORMULA
a(n) = 2*a(n-1) +a(n-2) -4*a(n-3) +a(n-4) +2*a(n-5) -a(n-6), n> 7.
a(n) = (3*n*(6*n^2-12*n+13)+(n-2)*(-1)^n-6)/8 for n>1, a(0)=0, a(1)=1. [Bruno Berselli, Dec 11 2012]
MATHEMATICA
CoefficientList[Series[x (1 + x + x^2) (1 + 6 x + 8 x^2 + 4 x^3 - x^4)/((1 + x)^2 (1 - x)^4), {x, 0, 50}], x] (* Vincenzo Librandi, Dec 11 2012 *)
LinearRecurrence[{2, 1, -4, 1, 2, -1}, {0, 1, 9, 34, 91, 192, 353, 584}, 40] (* Harvey P. Dale, Jun 23 2017 *)
PROG
(Magma) I:=[0, 1, 9, 34, 91, 192, 353, 584]; [n le 8 select I[n] else 2*Self(n-1)+Self(n-2)-4*Self(n-3)+Self(n-4)+2*Self(n-5)-Self(n-6): n in [1..40]]; // Vincenzo Librandi, Dec 11 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
R. J. Mathar, Nov 10 2008
STATUS
approved