%I #18 Sep 08 2022 08:44:57
%S 2,6,7,10,14,15,18,22,23,26,30,31,34,38,39,42,46,47,50,54,55,58,62,63,
%T 66,70,71,74,78,79,82,86,87,90,94,95,98,102,103,106,110,111,114,118,
%U 119,122,126,127,130,134,135,138,142,143,146,150,151,154,158,159
%N Numbers that are congruent to {2, 6, 7} mod 8.
%H G. C. Greubel, <a href="/A047552/b047552.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).
%F From _Chai Wah Wu_, May 29 2016: (Start)
%F a(n) = a(n-1) + a(n-3) - a(n-4).
%F G.f.: x*(x^3 + x^2 + 4*x + 2)/(x^4 - x^3 - x + 1). (End)
%F From _Wesley Ivan Hurt_, Jun 10 2016: (Start)
%F a(n) = (24*n-3-6*cos(2*n*Pi/3)-4*sqrt(3)*sin(2*n*Pi/3))/9.
%F a(3k) = 8k-1, a(3k-1) = 8k-2, a(3k-2) = 8k-6. (End)
%p A047552:=n->(24*n-3-6*cos(2*n*Pi/3)-4*sqrt(3)*sin(2*n*Pi/3))/9: seq(A047552(n), n=1..100); # _Wesley Ivan Hurt_, Jun 10 2016
%t LinearRecurrence[{1,0,1,-1}, {2, 6, 7,10}, 50] (* _G. C. Greubel_, May 29 2016 *)
%t Select[Range[200],MemberQ[{2,6,7},Mod[#,8]]&] (* _Harvey P. Dale_, Aug 05 2018 *)
%o (Magma) [n : n in [0..150] | n mod 8 in [2, 6, 7]]; // _Wesley Ivan Hurt_, Jun 10 2016
%K nonn,easy
%O 1,1
%A _N. J. A. Sloane_