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”).
%I #32 Sep 23 2022 10:14:56
%S 9,11,12,14,18,21,24,29,30,36,39,41,42,45,47,48,55,58,63,66,68,69,71,
%T 72,74,77,78,79,80,81,83,86,87,90,92,93,95,96,98,100,102,104,105,108,
%U 111,116,117,119,120,124,125,131,137,138,139,140,144,147,151,152
%N Values of k such that there is exactly one prime between 10k and 10k + 9.
%H V. Raman, <a href="/A216292/b216292.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) ~ 0.1 n log n. - _Charles R Greathouse IV_, Sep 07 2012
%F a(n) = floor(A078494(n) / 10). - _Charles R Greathouse IV_, Sep 07 2012
%e 36 is in the sequence because between 360 and 369 there is exactly one prime: 367. [_Bruno Berselli_, Sep 04 2012]
%t t = {}; Do[ps = Select[Range[10*n, 10*n + 9], PrimeQ]; If[Length[ps] == 1, AppendTo[t, n]], {n, 0, 199}]; t (* _T. D. Noe_, Sep 03 2012 *)
%t Select[Range[200],PrimePi[10#+9]-PrimePi[10#]==1&] (* _Harvey P. Dale_, Feb 04 2015 *)
%o (Magma) [n: n in [1..200] | IsOne(#PrimesInInterval(10*n, 10*n+9))]; // _Bruno Berselli_, Sep 04 2012
%o (PARI) is(n)=isprime(10*n+1)+isprime(10*n+3)+isprime(10*n+7)+isprime(10*n+9)==1 \\ _Charles R Greathouse IV_, Sep 07 2012
%o (Python)
%o from itertools import count, islice
%o from sympy import isprime
%o def A216292_gen(startvalue=1): # generator of terms >= startvalue
%o return filter(lambda k: sum(int(isprime(10*k+i)) for i in (1,3,7,9)) == 1, count(max(1,startvalue)))
%o A216292_list = list(islice(A216292_gen(),30)) # _Chai Wah Wu_, Sep 23 2022
%Y Cf. A007811, A032352, A078494, A216293.
%K nonn
%O 1,1
%A _V. Raman_, Sep 03 2012