OFFSET
1,3
COMMENTS
Complement of A017017. - Michel Marcus, Sep 10 2015
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,1,-1).
FORMULA
G.f.: x^2*(1+x+2*x^2+x^3+x^4+x^5) / ( (1+x)*(1+x+x^2)*(x^2-x+1)*(x-1)^2 ). - R. J. Mathar, Dec 03 2011
From Wesley Ivan Hurt, Sep 10 2015: (Start)
a(n) = a(n-1) + a(n-6) - a(n-7) for n>7.
a(n) = n + floor((n-4)/6). (End)
From Wesley Ivan Hurt, Jun 15 2016: (Start)
a(n) = (42*n-39+3*cos(n*Pi)-4*sqrt(3)*cos((1+4*n)*Pi/6)+12*sin((1-2*n)*Pi/6))/36.
a(6k) = 7k-1, a(6k-1) = 7k-2, a(6k-2) = 7k-3, a(6k-3) = 7k-5, a(6k-4) = 7k-6, a(6k-5) = 7k-7. (End)
MAPLE
for n from 0 to 200 do if n mod 7 <> 3 then printf(`%d, `, n) fi: od:
MATHEMATICA
Table[n+Floor[(n-4)/6], {n, 100}] (* Wesley Ivan Hurt, Sep 10 2015 *)
LinearRecurrence[{1, 0, 0, 0, 0, 1, -1}, {0, 1, 2, 4, 5, 6, 7}, 100] (* Vincenzo Librandi, Sep 11 2015 *)
DeleteCases[Range[0, 100], _?(Mod[#, 7]==3&)] (* Harvey P. Dale, May 07 2016 *)
PROG
(Magma) [n+Floor((n-4)/6) : n in [1..100]]; // Wesley Ivan Hurt, Sep 10 2015
(Magma) [n : n in [0..140] | n mod 7 in [0, 1, 2, 4, 5, 6]]; // Vincenzo Librandi, Sep 11 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from James A. Sellers, Feb 19 2001
STATUS
approved