OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,1,-1).
FORMULA
a(n) = a(n-1) + a(n-5) - a(n-6).
a(n) = floor((7*n-1)/5). - Gary Detlefs, May 14 2001
G.f.: x*(1 + x + 2*x^2 + x^3 + x^4 + x^5) / ( (x^4 + x^3 + x^2 + x + 1)*(x-1)^2 ). - R. J. Mathar, Dec 03 2011
MATHEMATICA
CoefficientList[Series[(1 + x + 2 x^2 + x^3 + x^4 + x^5) / ((x^4 + x^3 + x^2 + x + 1) (x - 1)^2), {x, 0, 60}], x] (* Vincenzo Librandi, Jul 26 2013 *)
LinearRecurrence[{1, 0, 0, 0, 1, -1}, {1, 2, 4, 5, 6, 8}, 100] (* Harvey P. Dale, Apr 02 2017 *)
PROG
(Magma) [n: n in [1..80] | n mod 7 in [1, 2, 4, 5, 6]]; // Vincenzo Librandi, Jul 26 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved