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
3, 3, 5, 9, 9, 10, 15, 15, 20, 21, 21, 25, 27, 27, 28, 33, 33, 35, 39, 39, 40, 45, 45, 50, 51, 51, 55, 57, 57, 63, 63, 63, 65, 69, 69, 70, 75, 75, 80, 81, 81, 85, 87, 87, 91, 93, 93, 95, 99, 99, 100, 105, 105, 110, 111, 111, 115, 117, 117, 119, 123, 123, 125, 129, 129, 130 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
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.
MATHEMATICA
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 *)
CROSSREFS
Cf. A053669.
Sequence in context: A079586 A354953 A125960 * A287195 A179437 A136791
KEYWORD
nonn
AUTHOR
Leroy Quet, Aug 19 2008
EXTENSIONS
Extended by Ray Chandler, Jun 22 2009
STATUS
approved

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 May 14 00:47 EDT 2024. Contains 372528 sequences. (Running on oeis4.)