%I #29 Sep 08 2022 08:44:57
%S 0,2,3,4,5,6,7,8,10,11,12,13,14,15,16,18,19,20,21,22,23,24,26,27,28,
%T 29,30,31,32,34,35,36,37,38,39,40,42,43,44,45,46,47,48,50,51,52,53,54,
%U 55,56,58,59,60,61,62,63,64,66,67,68,69,70,71,72,74,75,76
%N Numbers that are congruent to {0, 2, 3, 4, 5, 6, 7} mod 8.
%C A004774 without the 1. - _R. J. Mathar_, Oct 18 2008
%C Complement of A017077. - _Michel Marcus_, Sep 11 2015
%H G. C. Greubel, <a href="/A047594/b047594.txt">Table of n, a(n) for n = 1..5000</a>
%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,1,-1).
%F From _R. J. Mathar_, Mar 03 2009: (Start)
%F 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)).
%F a(n) = a(n-7) + 8 for n>7. (End)
%F a(n) = n + floor((n-2)/7). - _Wesley Ivan Hurt_, Sep 11 2015
%F From _Wesley Ivan Hurt_, Jul 21 2016: (Start)
%F a(n) = a(n-1) + a(n-7) - a(n-8) for n>8.
%F 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.
%F 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)
%p A047594:=n->n+floor((n-2)/7): seq(A047594(n), n=1..100); # _Wesley Ivan Hurt_, Sep 11 2015
%t Table[n+Floor[(n-2)/7], {n,100}] (* _Wesley Ivan Hurt_, Sep 11 2015 *)
%t Select[Range[0, 100], MemberQ[{0, 2, 3, 4, 5, 6, 7}, Mod[#, 8]] &] (* _Vincenzo Librandi_, Sep 12 2015 *)
%t DeleteCases[Range[0,70],_?(Mod[#,8]==1&)] (* _Harvey P. Dale_, Dec 19 2015 *)
%o (Magma) [n + Floor((n-2)/7) : n in [1..100]]; // _Wesley Ivan Hurt_, Sep 11 2015
%o (Magma) [n: n in [0..100] | n mod 8 in [0,2,3,4,5,6,7]]; // _Vincenzo Librandi_, Sep 12 2015
%o (PARI) a(n)=(8*n-2)\7 \\ _Charles R Greathouse IV_, Jul 21 2016
%Y Cf. A004774, A017077.
%K nonn,easy
%O 1,2
%A _N. J. A. Sloane_