OFFSET
0,3
COMMENTS
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,1,0,0,-1,0,0,1).
FORMULA
From Colin Barker, Dec 09 2019: (Start)
G.f.: (1 + x + 6*x^2 + x^3 - 3*x^5 + x^6 + 2*x^7 + 6*x^8) / ((1 - x)*(1 + x^2)*(1 + x + x^2)*(1 - x^2 + x^4)).
a(n) = a(n-3) - a(n-6) + a(n-9) for n>8.
(End)
EXAMPLE
a(0) = 6/6 = 1;
a(1) = 10/10 = 1;
a(2) = 30/5 = 6;
a(3) = 42/21 = 2.
MATHEMATICA
PadRight[{}, 120, {1, 1, 6, 2, 1, 3, 2, 2, 3, 1, 2, 6}] (* or *) LinearRecurrence[ {0, 0, 1, 0, 0, -1, 0, 0, 1}, {1, 1, 6, 2, 1, 3, 2, 2, 3}, 120] (* Harvey P. Dale, Dec 16 2021 *)
PROG
(PARI) Vec((1 + x + 6*x^2 + x^3 - 3*x^5 + x^6 + 2*x^7 + 6*x^8) / ((1 - x)*(1 + x^2)*(1 + x + x^2)*(1 - x^2 + x^4)) + O(x^80)) \\ Colin Barker, Dec 11 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Mar 08 2019
STATUS
approved