%I #26 Sep 08 2022 08:44:57
%S 0,1,2,7,8,9,10,15,16,17,18,23,24,25,26,31,32,33,34,39,40,41,42,47,48,
%T 49,50,55,56,57,58,63,64,65,66,71,72,73,74,79,80,81,82,87,88,89,90,95,
%U 96,97,98,103,104,105,106,111,112,113,114,119,120
%N Numbers that are congruent to {0, 1, 2, 7} mod 8.
%C Complement of numbers that are congruent to {3, 4, 5, 6} mod 8 (A047425). - _Jaroslav Krizek_, Dec 19 2009
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1).
%F a(n) = 3*n-4*floor((n-2)/4)-6+(-1)^n. - _Gary Detlefs_, Mar 27 2010
%F G.f.: x^2*(1+x+5*x^2+x^3) / ( (1+x)*(1+x^2)*(x-1)^2 ). - _R. J. Mathar_, Oct 08 2011
%F a(n) = a(n-1) + a(n-4) - a(n-5) for n>5. - _Harvey P. Dale_, Sep 05 2014
%F From _Wesley Ivan Hurt_, May 21 2016: (Start)
%F a(n) = (4n-5+i^(2n)+(1+i)*i^(-n)+(1-i)*i^n)/2 where i = sqrt(-1).
%F a(2n) = A047522(n), a(2n-1) = A047467(n). (End)
%F Sum_{n>=2} (-1)^n/a(n) = (5-sqrt(2))*log(2)/8 + sqrt(2)*log(2+sqrt(2))/4 - Pi/16. - _Amiram Eldar_, Dec 20 2021
%p seq(3*n-4*floor((n-2)/4)-6+(-1)^n, n=1..61); # _Gary Detlefs_, Mar 27 2010
%t Select[Range[0,200], MemberQ[{0,1,2,7}, Mod[#,8]]&] (* or *) LinearRecurrence[{1,0,0,1,-1}, {0,1,2,7,8}, 200] (* _Harvey P. Dale_, Sep 05 2014 *)
%o (Magma) [n : n in [0..100] | n mod 8 in [0, 1, 2, 7]]; // _Wesley Ivan Hurt_, May 21 2016
%Y Cf. A103127, A047425, A047467, A047522.
%K nonn,easy
%O 1,3
%A _N. J. A. Sloane_