The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A141584 a(n) = the closest multiple of A053669(2n) to 2n. A053669(2n) = the smallest prime coprime to 2n. 0

%I #8 Jan 19 2019 15:28:34

%S 3,3,5,9,9,10,15,15,20,21,21,25,27,27,28,33,33,35,39,39,40,45,45,50,

%T 51,51,55,57,57,63,63,63,65,69,69,70,75,75,80,81,81,85,87,87,91,93,93,

%U 95,99,99,100,105,105,110,111,111,115,117,117,119,123,123,125,129,129,130

%N a(n) = the closest multiple of A053669(2n) to 2n. A053669(2n) = the smallest prime coprime to 2n.

%e The smallest prime coprime to 30 is 7. The largest multiple of 7 that is < 30 is 28. The smallest multiple of 7 that is > 30 is 35. 28 is closer to 30 than 35 is, so a(15) = 28.

%t cm[n_]:=Module[{nn=100,prs,cp,m1,m2},prs=Prime[Range[PrimePi[2*nn]]];cp=SelectFirst[prs,CoprimeQ[#,n]&];m1=cp*Floor[n/cp];m2=m1+cp;If[n-m1<=m2-n,m1,m2]] (* _Harvey P. Dale_, Jan 19 2019 *)

%Y Cf. A053669.

%K nonn

%O 1,1

%A _Leroy Quet_, Aug 19 2008

%E Extended by _Ray Chandler_, Jun 22 2009

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 June 7 22:01 EDT 2024. Contains 373206 sequences. (Running on oeis4.)