OFFSET
1,3
COMMENTS
Complement of A017137. - Michel Marcus, Sep 15 2015
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,1,-1).
FORMULA
From Wesley Ivan Hurt, Sep 15 2015: (Start)
G.f.: x*(1+x+x^2+x^3+x^4+2*x^5+x^6)/((x-1)^2*(1+x+x^2+x^3+x^4+x^5+x^6)).
a(n) = a(n-1) + a(n-7) - a(n-8) for n>8.
a(n) = n - 1 + floor(n/7). (End)
From Wesley Ivan Hurt, Jul 21 2016: (Start)
a(n) = a(n-7) + 8 for n>7.
a(n) = (56*n - 70 - 6*(n mod 7) + ((n+1) mod 7) + ((n+2) mod 7) + ((n+3) mod 7) + ((n+4) mod 7) + ((n+5) mod 7) + ((n+6) mod 7))/49.
a(7*k) = 8*k-1, a(7*k-1) = 8*k-3, a(7*k-2) = 8*k-4, a(7*k-3) = 8*k-5, a(7*k-4) = 8*k-6, a(7*k-5) = 8*k-7, a(7*k-6) = 8*k-8. (End)
MAPLE
MATHEMATICA
Table[n - 1 + Floor[n/7], {n, 100}] (* Wesley Ivan Hurt, Sep 15 2015 *)
LinearRecurrence[{1, 0, 0, 0, 0, 0, 1, -1}, {0, 1, 2, 3, 4, 5, 7, 8}, 70] (* Vincenzo Librandi, Sep 16 2015 *)
PROG
(Magma) [n-1+Floor(n/7) : n in [1..100]]; // Wesley Ivan Hurt, Sep 15 2015
(Magma) I:=[0, 1, 2, 3, 4, 5, 7, 8]; [n le 8 select I[n] else Self(n-1) + Self(n-7) - Self(n-8): n in [1..70]]; // Vincenzo Librandi, Sep 16 2015
(PARI) vector(200, n, n-1+floor(n/7)) \\ Altug Alkan, Oct 23 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved