login
Smallest prime p(i) such that between 2p(i) and 2p(i+1) there exist n primes.
3

%I #13 Jan 20 2018 20:04:23

%S 59,2,5,31,89,509,113,1129,1951,7253,19609,16141,13339,28229,1327,

%T 281431,396733,1122287,461717,370261,2010733,492113,3279841,14246971,

%U 3117299,5826001,20831323,47326693,60487759,189695659,191912783,1301171033,2044207843,3129752191,476956933,836806669,2433630109

%N Smallest prime p(i) such that between 2p(i) and 2p(i+1) there exist n primes.

%H Charles R Greathouse IV, <a href="/A104380/b104380.txt">Table of n, a(n) for n = 0..53</a>

%e a(0)=59 because between 2*59=118 and 2*61=122 there are no primes and 59 is the least prime with this characteristic.

%e a(4)=89 because between 2*89=178 and 2*97=194 there are 4 primes, namely 179, 181, 191 and 193.

%t f[n_] := PrimePi[2Prime[n + 1]] - PrimePi[2Prime[n]]; t = Table[0, {30}]; Do[a = f[n]; If[t[[a + 1]] == 0, t[[a + 1]] = Prime[n]], {n, 2500000}]; t

%o (PARI) ct(a,b)=sum(k=a,b,isprime(k))

%o a(n)=my(p=2); forprime(q=3,, if(ct(2*p+1,2*q-1)==n, return(p)); p=q) \\ _Charles R Greathouse IV_, Nov 05 2017

%Y Cf. A060756, A102820, A215238.

%K nonn

%O 0,1

%A Ali A. Tanara (tanara(AT)khayam.ut.ac.ir) and _Robert G. Wilson v_, Mar 03 2005

%E a(27)-a(36) from _Charles R Greathouse IV_, Nov 05 2017