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!)
 A060267 Difference between 2 closest primes surrounding 2n. 5

%I

%S 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,

%T 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,

%U 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

%N Difference between 2 closest primes surrounding 2n.

%H Michael De Vlieger, <a href="/A060267/b060267.txt">Table of n, a(n) for n = 2..10000</a>

%e 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

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

%t Array[Subtract @@ NextPrime[#, {1, -1}] &[2 #] &, 96, 2] (* _Michael De Vlieger_, Nov 02 2017 *)

%t NextPrime[#]-NextPrime[#,-1]&/@(2*Range[2,100]) (* _Harvey P. Dale_, Nov 07 2017 *)

%o (PARI) a(n) = nextprime(2*n+1) - precprime(2*n-1); \\ _Michel Marcus_, Sep 16 2020

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

%K nonn

%O 2,1

%A _Labos Elemer_, Mar 23 2001

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 1 13:34 EDT 2021. Contains 346391 sequences. (Running on oeis4.)