login
Numbers that are congruent to {0, 3, 4, 6} mod 8.
1

%I #27 Sep 08 2022 08:44:57

%S 0,3,4,6,8,11,12,14,16,19,20,22,24,27,28,30,32,35,36,38,40,43,44,46,

%T 48,51,52,54,56,59,60,62,64,67,68,70,72,75,76,78,80,83,84,86,88,91,92,

%U 94,96,99,100,102,104,107,108,110,112,115,116,118,120,123,124

%N Numbers that are congruent to {0, 3, 4, 6} mod 8.

%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1).

%F G.f.: x^2*(3+x+2*x^2+2*x^3) / ( (1+x)*(x^2+1)*(x-1)^2 ). - _R. J. Mathar_, Dec 05 2011

%F From _Wesley Ivan Hurt_, May 24 2016: (Start)

%F a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.

%F a(n) = (8*n-7+i^(2*n)-i^(-n)-i^n)/4 where i=sqrt(-1).

%F a(2k) = A047398(k), a(2k-1) = A008586(k-1) for k>0. (End)

%F E.g.f.: (4 - cos(x) + 4*(x - 1)*sinh(x) + (4*x - 3)*cosh(x))/2. - _Ilya Gutkovskiy_, May 25 2016

%F Sum_{n>=2} (-1)^n/a(n) = 5*log(2)/8 + sqrt(2)*log(3-2*sqrt(2))/16 - (2-sqrt(2))*Pi/16. - _Amiram Eldar_, Dec 21 2021

%p A047414:=n->(8*n-7+I^(2*n)-I^(-n)-I^n)/4: seq(A047414(n), n=1..100); # _Wesley Ivan Hurt_, May 24 2016

%t Select[Range[0,200], MemberQ[{0,3,4,6}, Mod[#,8]]&] (* _Harvey P. Dale_, May 10 2013 *)

%o (Magma) [n : n in [0..150] | n mod 8 in [0, 3, 4, 6]]; // _Wesley Ivan Hurt_, May 24 2016

%Y Cf. A008586, A047398.

%K nonn,easy

%O 1,2

%A _N. J. A. Sloane_