%I #29 Jul 12 2017 17:34:02
%S 37027,15590,3562,3561,1881,1856,735,588,132,131,188,111,89,47,44,32,
%T 20,11,9,8,5,3,2
%N a(n) = the smallest integer k where there are exactly n primes between 10k and 10k+100.
%C a(25) = 0, and a(24) cannot exist. The same is true with a(k) and k>25. From A020497, we see that a range of 101 numbers is required to find 24 primes. It is an open question if a(23) exists.
%C From _Robert Israel_, Jan 18 2017: (Start)
%C Dickson's conjecture implies that a(23) does exist.
%C Let Q = 27926129625869590, and R = 614889782588491410 the product of all primes < 50.
%C Then for any k, the 23 numbers Q+i+k*R for i = 1, 3, 7, 9, 13, 19, 21, 27, 31, 33, 37, 43, 49, 51, 57, 63, 69, 73, 79, 87, 91, 97, 99 have no prime divisors < 50.
%C Dickson's conjecture would indicate that there are infinitely many k for which these numbers are all prime, and thus there are 23 primes between Q+k*R and Q+k*R+100. (End)
%C Heuristics suggest a(23) exists (see above) and has between 20 and 30 digits. There are 192 residue classes mod 23# = 223092870 in which a(23) might fall, all of which are 11 mod 30 and either 3 or 4 mod 7. - _Charles R Greathouse IV_, Jul 12 2017
%e For n = 1 there is only one prime between 155900 and 156000: 155921.
%p for n from 1 to 10^5 do
%p T[n]:= nops(select(isprime, [$10*n+1 ..10*n+9]))
%p od:
%p for k from 1 to 10^5-10 do
%p v:= add(T[k+j],j=0..9):
%p if not assigned(A[v]) then A[v]:= k fi
%p od:
%p seq(A[n],n=0..22); # _Robert Israel_, Jul 12 2017
%t Function[s, -1 + Flatten@ Table[FirstPosition[s, n] /. k_ /; MissingQ@ k -> 0, {n, 0, Max@ s}]]@ Table[Count[Range[10 k, 10 k + 100], _?PrimeQ], {k, 0, 10^5}] (* _Michael De Vlieger_, Jul 12 2017; program writes "-1" for a(23) and a(24). *)
%o (PARI) a(n) = my(k=0); while(1, if(primepi(10*k+100)-primepi(10*k)==n, return(k)); k++) \\ _Felix Fröhlich_, Jul 12 2017
%o (PARI) a(n)=my(k); while(sum(p=10*k+1,10*k+99,isprime(p))!=n, k++); k \\ _Charles R Greathouse IV_, Jul 12 2017
%Y Cf. A186311.
%Y For the Dickson conjecture, see A020497.
%K nonn,fini
%O 0,1
%A _Wolfram Hüttermann_, Dec 21 2016
%E Name clarified by _FUNG Cheok Yin_, Jul 12 2017