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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A060267 Difference between 2 closest primes surrounding 2n. 5
2, 2, 4, 4, 2, 4, 4, 2, 4, 4, 6, 6, 6, 2, 6, 6, 6, 4, 4, 2, 4, 4, 6, 6, 6, 6, 6, 6, 2, 6, 6, 6, 4, 4, 2, 6, 6, 6, 4, 4, 6, 6, 6, 8, 8, 8, 8, 4, 4, 2, 4, 4, 2, 4, 4, 14, 14, 14, 14, 14, 14, 14, 4, 4, 6, 6, 6, 2, 10, 10, 10, 10, 10, 2, 6, 6, 6, 6, 6, 6, 4, 4, 6, 6, 6, 6, 6, 6, 2, 10, 10, 10, 10, 10, 2, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,1

LINKS

Michael De Vlieger, Table of n, a(n) for n = 2..10000

EXAMPLE

a(3) = 2 because the closest primes to 2*3 = 6 are (5,7) and the difference between these is 2. - Michael De Vlieger, Nov 02 2017

MAPLE

with(numtheory): [seq(nextprime(2*i)-prevprime(2*i), i=2..256)];

MATHEMATICA

Array[Subtract @@ NextPrime[#, {1, -1}] &[2 #] &, 96, 2] (* Michael De Vlieger, Nov 02 2017 *)

NextPrime[#]-NextPrime[#, -1]&/@(2*Range[2, 100]) (* Harvey P. Dale, Nov 07 2017 *)

PROG

(PARI) a(n) = nextprime(2*n+1) - precprime(2*n-1); \\ Michel Marcus, Sep 16 2020

CROSSREFS

Cf. A020482, A049653, A060264, A060265, A060266, A060268.

Sequence in context: A130501 A049116 A065176 * A214516 A238004 A048244

Adjacent sequences:  A060264 A060265 A060266 * A060268 A060269 A060270

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 19 03:23 EDT 2021. Contains 345125 sequences. (Running on oeis4.)