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!)
 A060268 Distance of 2n from the closest prime. 7
 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 7, 5, 3, 1, 1, 1, 1, 3, 1, 1, 1, 3, 5, 3, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 3, 5, 3, 1, 1, 1, 1, 1, 1, 3, 5, 5, 3, 1, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 2,12 LINKS FORMULA a(n) = min(A049653(n), A060266(n)). - Michel Marcus, Sep 16 2020 EXAMPLE n=13, 2n=26 surrounded by 23 and 29 which are from 26 in equal distance of 3 and min{3,3}=3=a(13). MAPLE with(numtheory): [seq(min(nextprime(2*i)-2*i, 2*i-prevprime(2*i)), i=2...256)]; MATHEMATICA a[n_] := Min[NextPrime[2*n] - 2*n, 2*n - NextPrime[2*n, -1]]; Array[a, 100, 2] (* Amiram Eldar, Sep 16 2020 *) PROG (PARI) a(n) = min(2*n - precprime(2*n-1), nextprime(2*n+1) - 2*n); \\ Michel Marcus, Sep 16 2020 CROSSREFS Cf. A020482, A049653, A051702, A059959, A060266. Sequence in context: A328517 A007362 A214709 * A339877 A030328 A176563 Adjacent sequences:  A060265 A060266 A060267 * A060269 A060270 A060271 KEYWORD nonn AUTHOR Labos Elemer, Mar 23 2001 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 August 2 11:23 EDT 2021. Contains 346422 sequences. (Running on oeis4.)