OFFSET
1,2
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,1,-1).
FORMULA
a(n) = (24*floor(n/6)+3*n^2-3*n+8+9*floor(n/3)*(3*floor(n/3)-2*n+1)-(3*n^2-7*n+8+3*floor(n/3)*(9*floor(n/3)-6*n+7))*(-1)^floor(n/3))/4. - Luce ETIENNE, Apr 08 2017
From Colin Barker, Apr 08 2017: (Start)
G.f.: x*(1 + x + 2*x^2 - x^3 + 2*x^4 + x^5) / ((1 - x)^2*(1 + x)*(1 - x + x^2)*(1 + x + x^2)).
a(n) = a(n-1) + a(n-6) - a(n-7) for n>7.
(End)
MATHEMATICA
LinearRecurrence[{1, 0, 0, 0, 0, 1, -1}, {1, 2, 4, 3, 5, 6, 7}, 80] (* Harvey P. Dale, Aug 26 2024 *)
PROG
(PARI) Vec(x*(1 + x + 2*x^2 - x^3 + 2*x^4 + x^5) / ((1 - x)^2*(1 + x)*(1 - x + x^2)*(1 + x + x^2)) + O(x^100)) \\ Colin Barker, Apr 08 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Sep 23 2007
STATUS
approved