OFFSET
0,3
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,-1,1,-1,-1,1).
FORMULA
From Colin Barker, Apr 01 2018: (Start)
G.f.: x*(1 + x - 2*x^2 + 2*x^3 + x^4 + x^5) / ((1 - x)^3*(1 + x)^2*(1 + x^2)).
a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-4) - a(n-5) - a(n-6) + a(n-7) for n>6.
(End)
MATHEMATICA
Flatten[Table[{4n^2, 4n^2+1, (2n+1)^2+1, (2n+1)^2}, {n, 0, 20}]] (* or *) LinearRecurrence[{1, 1, -1, 1, -1, -1, 1}, {0, 1, 2, 1, 4, 5, 10}, 80] (* Harvey P. Dale, Mar 18 2016 *)
PROG
(PARI) concat(0, Vec(x*(1 + x - 2*x^2 + 2*x^3 + x^4 + x^5) / ((1 - x)^3*(1 + x)^2*(1 + x^2)) + O(x^60))) \\ Colin Barker, Apr 01 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Apr 05 2008
STATUS
approved