%I #24 Mar 27 2023 08:48:28
%S 0,3,4,5,8,11,12,13,16,19,20,21,24,27,28,29,32,35,36,37,40,43,44,45,
%T 48,51,52,53,56,59,60,61,64,67,68,69,72,75,76,77,80,83,84,85,88,91,92,
%U 93,96,99,100,101,104,107,108,109,112,115,116,117,120,123,124
%N Numbers that are congruent to {0, 3, 4, 5} mod 8.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,-2,2,-1).
%F From _R. J. Mathar_, Oct 08 2011: (Start)
%F G.f.: ( x^2*(3-2*x+3*x^2) ) / ( (x^2+1)*(x-1)^2 ).
%F a(n) = 2*n-2-cos(n*Pi/2). (End)
%F From _Wesley Ivan Hurt_, May 22 2016: (Start)
%F a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>4.
%F a(n) = 2n - 2 - (i^(-n) + i^n)/2 where i = sqrt(-1).
%F a(2n) = A047621(n), a(2n+1) = A008586(n) for n>0. (End)
%F Sum_{n>=2} (-1)^n/a(n) = 3*log(2)/4 + sqrt(2)*log(3-2*sqrt(2))/8. - _Amiram Eldar_, Dec 21 2021
%p A047599:=n->2*n-2-(I^(-n)+I^n)/2: seq(A047599(n), n=1..100); # _Wesley Ivan Hurt_, May 22 2016
%t Table[2n-2-(I^(-n)+I^n)/2, {n, 80}] (* _Wesley Ivan Hurt_, May 22 2016 *)
%t LinearRecurrence[{2,-2,2,-1},{0,3,4,5},80] (* _Harvey P. Dale_, Mar 27 2023 *)
%o (Sage) [lucas_number1(n, 0, 1)+2*n for n in range(0, 55)] # _Zerinvary Lajos_, Mar 09 2009
%o (Magma) [n : n in [0..150] | n mod 8 in [0, 3, 4, 5]]; // _Wesley Ivan Hurt_, May 22 2016
%Y Cf. A008586, A047621.
%K nonn,easy
%O 1,2
%A _N. J. A. Sloane_
%E More terms from _Wesley Ivan Hurt_, May 22 2016