login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Numbers that are congruent to {2, 5, 6, 7} mod 8.
4

%I #36 Dec 26 2021 02:53:45

%S 2,5,6,7,10,13,14,15,18,21,22,23,26,29,30,31,34,37,38,39,42,45,46,47,

%T 50,53,54,55,58,61,62,63,66,69,70,71,74,77,78,79,82,85,86,87,90,93,94,

%U 95,98,101,102,103,106,109,110,111,114,117,118,119,122,125

%N Numbers that are congruent to {2, 5, 6, 7} mod 8.

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

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

%F a(n) = 2*n - cos(Pi*n/2). - _Wesley Ivan Hurt_, Oct 22 2013

%F From _Wesley Ivan Hurt_, May 20 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) = (4*n - i^(-n) - i^n)/2 where i=sqrt(-1).

%F a(2n) = A047550(n), a(2n-1) = A016825(n-1). (End)

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

%p A047578:=n->2*n-cos(Pi*n/2): seq(A047578(n), n=1..100); # _Wesley Ivan Hurt_, Oct 22 2013

%t Flatten[#+{2,5,6,7}&/@(8Range[0,20])] (* _Harvey P. Dale_, Jan 26 2011 *)

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

%Y Cf. A016825, A047404, A047431, A047546, A047550, A056594.

%K nonn,easy

%O 1,1

%A _N. J. A. Sloane_

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