[go: up one dir, main page]

login
Numbers that are congruent to {0, 1, 2, 5} mod 8.
2

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

%S 0,1,2,5,8,9,10,13,16,17,18,21,24,25,26,29,32,33,34,37,40,41,42,45,48,

%T 49,50,53,56,57,58,61,64,65,66,69,72,73,74,77,80,81,82,85,88,89,90,93,

%U 96,97,98,101,104,105,106,109,112,113,114,117,120,121,122

%N Numbers that are congruent to {0, 1, 2, 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*(1+3*x^2) / ( (x^2+1)*(x-1)^2 ).

%F a(n) = 2*n-3+sin(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) = (4n-6+I^(1-n)-I^(1+n))/2 where i=sqrt(-1).

%F a(2n+2) = A016813(n) n>0, a(2n-1) = A047467(n). (End)

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

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

%t Table[(4n-6+I^(1-n)-I^(1+n))/2, {n, 80}] (* _Wesley Ivan Hurt_, May 22 2016 *)

%t LinearRecurrence[{2,-2,2,-1},{0,1,2,5},120] (* _Harvey P. Dale_, Mar 11 2017 *)

%o (Sage) [lucas_number1(n,0,1)+2*n-3 for n in range(1,57)] # _Zerinvary Lajos_, Jul 06 2008

%o (Magma) [n : n in [0..150] | n mod 8 in [0, 1, 2, 5]]; // _Wesley Ivan Hurt_, May 22 2016

%Y Cf. A016813, A047404, A047431, A047467, A047546, A047557, A047578, A056594.

%K nonn,easy

%O 1,3

%A _N. J. A. Sloane_

%E More terms from _Wesley Ivan Hurt_, May 22 2016