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!)
A047315 Numbers that are congruent to {2, 4, 5, 6} mod 7. 1

%I #15 Sep 08 2022 08:44:56

%S 2,4,5,6,9,11,12,13,16,18,19,20,23,25,26,27,30,32,33,34,37,39,40,41,

%T 44,46,47,48,51,53,54,55,58,60,61,62,65,67,68,69,72,74,75,76,79,81,82,

%U 83,86,88,89,90,93,95,96,97,100,102,103,104,107,109,110,111

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

%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+2*x+x^2+x^3+x^4) / ( (1+x)*(x^2+1)*(x-1)^2 ). - _R. J. Mathar_, Dec 03 2011

%F From _Wesley Ivan Hurt_, Jun 03 2016: (Start)

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

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

%F a(2k) = A047288(k), a(2k-1) = A047385(k). (End)

%p A047315:=n->(14*n-1-I^(2*n)-(3-I)*I^(-n)-(3+I)*I^n)/8: seq(A047315(n), n=1..100); # _Wesley Ivan Hurt_, Jun 03 2016

%t Table[(14n-1-I^(2n)-(3-I)*I^(-n)-(3+I)*I^n)/8, {n, 80}] (* _Wesley Ivan Hurt_, Jun 03 2016 *)

%t Select[Range[200],MemberQ[{2,4,5,6},Mod[#,7]]&] (* or *) LinearRecurrence[ {1,0,0,1,-1},{2,4,5,6,9},100] (* _Harvey P. Dale_, Jan 19 2019 *)

%o (Magma) [n : n in [0..150] | n mod 7 in [2, 4, 5, 6]]; // _Wesley Ivan Hurt_, Jun 03 2016

%Y Cf. A047288, A047385.

%K nonn,easy

%O 1,1

%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 April 24 16:25 EDT 2024. Contains 371961 sequences. (Running on oeis4.)