login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Difference between smallest prime following and largest prime preceding 2*(n-th prime).
0

%I #7 Oct 15 2013 22:30:59

%S 2,4,4,4,6,6,4,4,6,6,6,4,6,8,4,14,14,6,10,10,6,4,6,4,12,12,12,12,4,6,

%T 6,6,4,14,14,4,14,6,10,6,8,4,6,8,4,10,6,8,4,4,12,8,4,12,18,18,6,10,6,

%U 6,10,4,12,12,10,12,4,10,10,8,10,6,8,4,8,14,10,12,10,10,14,4,14,4,4,20,8

%N Difference between smallest prime following and largest prime preceding 2*(n-th prime).

%e n=1: p(1)=2, 2p(1)=4 is between 3 and 5, their difference is 2=a(1); n=6: p(6)=13, 2p(6)=26 is between 23 and 29 and their difference is 6=a(6).

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

%t dsplp[n_]:=Module[{np=2Prime[n]},NextPrime[np]-NextPrime[np,-1]]; Array[ dsplp,90,2] (* _Harvey P. Dale_, Mar 20 2013 *)

%Y Cf. A059786-A059790, A013633, A058043, A058249, A058044, A060267, A001223.

%K nonn

%O 2,1

%A _Labos Elemer_, Mar 23 2001