OFFSET
1,2
COMMENTS
A004774 without the 1. - R. J. Mathar, Oct 18 2008
Complement of A017077. - Michel Marcus, Sep 11 2015
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..5000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,1,-1).
FORMULA
From R. J. Mathar, Mar 03 2009: (Start)
G.f.: x^2*(2+x+x^2+x^3+x^4+x^5+x^6)/((1-x)^2*(x^6+x^5+x^4+x^3+x^2+x+1)).
a(n) = a(n-7) + 8 for n>7. (End)
a(n) = n + floor((n-2)/7). - Wesley Ivan Hurt, Sep 11 2015
From Wesley Ivan Hurt, Jul 21 2016: (Start)
a(n) = a(n-1) + a(n-7) - a(n-8) for n>8.
a(n) = (56*n - 35 + (n mod 7) + ((n+1) mod 7) + ((n+2) mod 7) + ((n+3) mod 7) + ((n+4) mod 7) - 6*((n+5) mod 7) + ((n+6) mod 7))/49.
a(7k) = 8k-1, a(7k-1) = 8k-2, a(7k-2) = 8k-3, a(7k-3) = 8k-4, a(7k-4) = 8k-5, a(7k-5) = 8k-6, a(7k-6) = 8k-8. (End)
MAPLE
MATHEMATICA
Table[n+Floor[(n-2)/7], {n, 100}] (* Wesley Ivan Hurt, Sep 11 2015 *)
Select[Range[0, 100], MemberQ[{0, 2, 3, 4, 5, 6, 7}, Mod[#, 8]] &] (* Vincenzo Librandi, Sep 12 2015 *)
DeleteCases[Range[0, 70], _?(Mod[#, 8]==1&)] (* Harvey P. Dale, Dec 19 2015 *)
PROG
(Magma) [n + Floor((n-2)/7) : n in [1..100]]; // Wesley Ivan Hurt, Sep 11 2015
(Magma) [n: n in [0..100] | n mod 8 in [0, 2, 3, 4, 5, 6, 7]]; // Vincenzo Librandi, Sep 12 2015
(PARI) a(n)=(8*n-2)\7 \\ Charles R Greathouse IV, Jul 21 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved