The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A185052 Nearest prime to (prime(n)/2)^4. 1
 2, 5, 41, 151, 919, 1787, 5227, 8147, 17491, 44207, 57719, 117133, 176611, 213659, 304981, 493159, 757331, 865363, 1259429, 1588231, 1774901, 2434381, 2966141, 3921383, 5533067, 6503771, 7034429, 8192473, 8822377, 10190473, 16259017, 18406229, 22017199 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS Nearest prime program by Ignacio Grande in LinkedIn Mathematica users group as answer to my question. LINKS Robert Israel, Table of n, a(n) for n = 1..10000 MAPLE f:= proc(n) local x, q, r, v;      x:= (ithprime(n)/2)^4;      q:= nextprime(floor(x));      r:= prevprime(ceil(x));      v:= (q+r)/2;      if v > x then r else q fi end proc: f(1):= 2: map(f, [\$1..50]); # Robert Israel, Aug 04 2019 MATHEMATICA nearestPrime[n_Integer] := Module[{n2}, n2 = (Prime[n]/2)^4;   If[n2 < 2, {2}, Nearest[Prime[PrimePi[n2] + {0, 1}], n2, 1]][[1]]]; nearestPrime /@ Range[20] CROSSREFS Cf. A186732. Sequence in context: A286560 A002592 A054553 * A088547 A009457 A175172 Adjacent sequences:  A185049 A185050 A185051 * A185053 A185054 A185055 KEYWORD nonn,easy AUTHOR Roger L. Bagula, Jan 22 2012 STATUS approved

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

Last modified April 18 19:31 EDT 2021. Contains 343089 sequences. (Running on oeis4.)