OFFSET
1,1
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
For n > 4 a(n) = a(n - 4) + 8.
G.f.: x*(4 + 3*x + 3*x^2 - x^3 - x^4) / ((1 - x)^2*(1 + x)*(1 + x^2)). - Colin Barker, Feb 23 2017
MATHEMATICA
Table[2*k + 1 + Mod[k, 4], {k, 100}]
CoefficientList[ Series[(4 + 3 x + 3 x^2 - x^3 - x^4)/((x -1)^2 (1 + x + x^2 + x^3)), {x, 0, 60}], x] (* or *)
LinearRecurrence[{1, 0, 0, 1, -1}, {4, 7, 10, 9, 12}, 70] (* Robert G. Wilson v, Feb 23 2017 *)
PROG
(PARI) Vec(x*(4 + 3*x + 3*x^2 - x^3 - x^4) / ((1 - x)^2*(1 + x)*(1 + x^2)) + O(x^100)) \\ Colin Barker, Feb 23 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, Feb 23 2017
STATUS
approved