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

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

%S 2,3,5,9,10,12,16,17,19,23,24,26,30,31,33,37,38,40,44,45,47,51,52,54,

%T 58,59,61,65,66,68,72,73,75,79,80,82,86,87,89,93,94,96,100,101,103,

%U 107,108,110,114,115,117,121,122,124,128,129,131,135,136,138,142

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

%C Union of A017005, A017017 and A017041. - _Michel Marcus_, May 25 2014

%H G. C. Greubel, <a href="/A047370/b047370.txt">Table of n, a(n) for n = 1..1000</a>

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

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

%F a(n) = a(n-1) + a(n-3) - a(n-4) for n>4, with a(1)=2, a(2)=3, a(3)=5, a(4)=9. - _Harvey P. Dale_, Apr 29 2013

%F a(n) = 7*floor((n-1)/3)+2^((n-1) mod 3)+1. - _Gary Detlefs_, May 25 2014

%F a(n) = (1/9)*(21*n+4*sqrt(3)*sin((2*Pi*n)/3)-6*cos((2*Pi*n)/3)-12). - _Alexander R. Povolotsky_, May 25 2014

%F a(3k) = 7k-2, a(3k-1) = 7k-4, a(3k-2) = 7k-5. - _Wesley Ivan Hurt_, Jun 10 2016

%p A047370:=n->7*floor((n-1)/3) + 2^((n-1) mod 3)+1; seq(A047370(n), n=1..50); # _Wesley Ivan Hurt_, May 25 2014

%t Select[Range[200], MemberQ[{2,3,5}, Mod[#,7]]&] (* or *) LinearRecurrence[ {1,0,1,-1}, {2,3,5,9}, 60] (* _Harvey P. Dale_, Apr 29 2013 *)

%t Table[7*Floor[(n - 1)/3] + 2^Mod[n - 1, 3] + 1, {n, 50}] (* _Wesley Ivan Hurt_, May 25 2014 *)

%o (Magma) [7*Floor((n-1)/3)+2^((n-1) mod 3)+1: n in [1..50]]; // _Wesley Ivan Hurt_, May 25 2014

%o (PARI) x='x + O('x^50); Vec(x*(2+x+2*x^2+2*x^3)/((1+x+x^2)*(x-1)^2)) \\ _G. C. Greubel_, Feb 21 2017

%Y Cf. A017005, A017017, A017041.

%K nonn,easy

%O 1,1

%A _N. J. A. Sloane_, Dec 11 1999

%E More terms from _Wesley Ivan Hurt_, May 25 2014

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 29 10:44 EDT 2024. Contains 371268 sequences. (Running on oeis4.)