OFFSET
0,5
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..5000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,1,-1).
FORMULA
a(n) = floor(n/2) - floor((n+1)/6), n >= 0.
G.f.: (x^2/((1+x)*(1-x)^2))*(1-x^3/((1+x+x^2)*(1-x+x^2))).
a(n) = a(n-1) + a(n-6) - a(n-7) for n>6. - Colin Barker, May 18 2017
MATHEMATICA
Table[Floor[n/2] - Floor[(n + 1)/6], {n, 0, 60}] (* or *)
CoefficientList[Series[(x^2/((1 + x) (1 - x)^2)) (1 - x^3/((1 + x + x^2) (1 - x + x^2))), {x, 0, 60}], x] (* Michael De Vlieger, May 13 2017 *)
PROG
(Magma) [Floor(n/2)-Floor((n+1)/6): n in [0..100]]; // Vincenzo Librandi, May 15 2017
(PARI) concat(vector(2), Vec(x^2*(1 + x^2 - x^3 + x^4) / ((1 - x)^2*(1 + x)*(1 - x + x^2)*(1 + x + x^2)) + O(x^100))) \\ Colin Barker, May 18 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wolfdieter Lang, May 12 2017
STATUS
approved