login
Least number x such that there are n numbers of the form 6k-1 or 6k+1 between prime(x) and prime(x+1).
0

%I #8 Jun 27 2012 00:40:22

%S 1,9,24,46,30,99,154,263,367,590,217,1183,2191,1879,1831,3077,2225,

%T 3793,4612,4522,3644,14862,12542,3385,19026,17006,23283,38590,14357,

%U 34215,73321,30802,33608,110224,85633,165326,31545,40933,103520,141718,224659,126172

%N Least number x such that there are n numbers of the form 6k-1 or 6k+1 between prime(x) and prime(x+1).

%C First occurrence of n in A213902.

%e Smallest n such that A213902(n)=2 is n=24, so a(2)=24.

%t nn = 10^6; t = Join[{3}, Union[6 Range[nn] - 1, 6 Range[nn] + 1]]; cnt = 0; t2 = Reap[Do[If[PrimeQ[t[[i]]], Sow[cnt]; cnt = 0, cnt++], {i, Length[t]}]][[2,1]]; t3 = {}; n = 0; While[pos = Position[t2, n, 1, 1]; pos != {}, AppendTo[t3, pos[[1, 1]]]; n++]; t3 (* _T. D. Noe_, Jun 26 2012 *)

%Y Cf. A213902.

%K nonn

%O 0,2

%A _Alex Ratushnyak_, Jun 24 2012