Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #15 Sep 08 2022 08:44:57
%S 2,4,7,10,12,15,18,20,23,26,28,31,34,36,39,42,44,47,50,52,55,58,60,63,
%T 66,68,71,74,76,79,82,84,87,90,92,95,98,100,103,106,108,111,114,116,
%U 119,122,124,127,130,132,135,138,140,143,146,148,151,154,156,159
%N Numbers that are congruent to {2, 4, 7} mod 8.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).
%F a(n) = floor((8*n-2)/3). - _Gary Detlefs_, Mar 13 2010
%F From _Wesley Ivan Hurt_, Jun 09 2016: (Start)
%F G.f.: x*(2+2*x+3*x^2+x^3)/((x-1)^2*(1+x+x^2)).
%F a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
%F a(n) = (24*n-9+2*sqrt(3)*sin(2*n*Pi/3))/9.
%F a(3k) = 8k-1, a(3k-1) = 8k-4, a(3k-2) = 8k-6. (End)
%p seq(floor((8*n-3)/3), n=1..51); # _Gary Detlefs_, Mar 07 2010
%t Table[Floor[(8 n - 2)/3], {n, 50}] (* _Wesley Ivan Hurt_, Feb 15 2014 *)
%o (Magma) [n : n in [0..150] | n mod 8 in [2, 4, 7]]; // _Wesley Ivan Hurt_, Jun 09 2016
%K nonn,easy
%O 1,1
%A _N. J. A. Sloane_