login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A047431 Numbers that are congruent to {1, 4, 5, 6} mod 8. 5

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

%S 1,4,5,6,9,12,13,14,17,20,21,22,25,28,29,30,33,36,37,38,41,44,45,46,

%T 49,52,53,54,57,60,61,62,65,68,69,70,73,76,77,78,81,84,85,86,89,92,93,

%U 94,97,100,101,102,105,108,109,110,113,116,117,118,121,124

%N Numbers that are congruent to {1, 4, 5, 6} 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+2*x-x^2+2*x^3)/((x^2+1)*(x-1)^2). - _R. J. Mathar_, Oct 08 2011

%F a(n) = (-2-(-i)^n-i^n+4n)/2 where i=sqrt(-1). - _Colin Barker_, Jun 06 2012

%F From _Wesley Ivan Hurt_, May 30 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(2k) = A047406(k), a(2k-1) = A016813(k-1) k>0. (End)

%F E.g.f.: 2 - cos(x) - (1 - 2*x)*exp(x). - _Ilya Gutkovskiy_, May 30 2016

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

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

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

%t LinearRecurrence[{2,-2,2,-1},{1,4,5,6},70] (* _Harvey P. Dale_, Dec 04 2018 *)

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

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

%Y Cf. A016813, A047404, A047406, A047546, A056594.

%K nonn,easy

%O 1,2

%A _N. J. A. Sloane_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 05:02 EDT 2024. Contains 371235 sequences. (Running on oeis4.)