%I #18 Sep 06 2024 14:43:22
%S 2,4,9,24,30,30,30,99,99,154,189,217,217,217,217,217,217,1183,1831,
%T 1831,1831,1831,2225,2225,2225,2225,3385,3385,3385,3385,3385,3385,
%U 3385,3385,3385,3385,14357,14357,14357,14357,14357,14357,14357,30802,30802,30802
%N a(n) is the index of the smallest prime such that the gap to the next prime is not less than 2*n.
%H Amiram Eldar, <a href="/A144309/b144309.txt">Table of n, a(n) for n = 1..775</a>
%F a(n) = primepi(A100964(n)) = A000720(A100964(n)). - _Michel Marcus_, Nov 02 2013
%t a = {}; Do[n = 1; While[(Prime[n + 1] - Prime[n]) < 2 k, n++ ]; AppendTo[a, n], {k, 1, 75}]; a
%o (PARI) lista(pmax) = {my(k = 1, prv = 2, m = 2, kprv = 2); forprime(p = 3, pmax, k++; if(p - prv >= m, for(i = 1, (p - prv - m)/2 + 1, print1(k-1, ", ")); m = p - prv + 2; kprv = k); prv = p);} \\ _Amiram Eldar_, Sep 06 2024
%Y For indices of smallest prime such that gap to next prime is exactly equal to 2*n see A000230. For records in this sequence see A005669.
%Y Cf. A000720, A100964.
%K nonn
%O 1,1
%A _Artur Jasinski_, Sep 17 2008