OFFSET
0,2
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,0,1,-2,1).
FORMULA
G.f.: (1+x)^2*(1-x+x^2)*(1+x+x^2) / ((1-x)^3*(1+x+x^2+x^3+x^4)).
a(n) = 2*a(n-1) - a(n-2) + a(n-5) - 2*a(n-6) + a(n-7). - Vincenzo Librandi, Jan 01 2016
MATHEMATICA
LinearRecurrence[{2, -1, 0, 0, 1, -2, 1}, {1, 4, 9, 16, 25, 37, 52}, 60] (* Vincenzo Librandi, Jan 01 2016 *)
PROG
(PARI) Vec((1+x)^2*(1-x+x^2)*(1+x+x^2)/((1-x)^3*(1+x+x^2+x^3+x^4)) + O(x^70)) \\ Colin Barker, Jan 01 2016
(Magma) I:=[1, 4, 9, 16, 25, 37, 52]; [n le 7 select I[n] else 2*Self(n-1)-Self(n-2)+Self(n-5)-2*Self(n-6)+Self(n-7): n in [1..60]]; // Vincenzo Librandi, Jan 01 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Dec 29 2015
STATUS
approved