A216292 Values of k such that there is exactly one prime between 10k and 10k + 9.
9, 11, 12, 14, 18, 21, 24, 29, 30, 36, 39, 41, 42, 45, 47, 48, 55, 58, 63, 66, 68, 69, 71, 72, 74, 77, 78, 79, 80, 81, 83, 86, 87, 90, 92, 93, 95, 96, 98, 100, 102, 104, 105, 108, 111, 116, 117, 119, 120, 124, 125, 131, 137, 138, 139, 140, 144, 147, 151, 152
Offset: 1
Keywords
Examples
36 is in the sequence because between 360 and 369 there is exactly one prime: 367. [_Bruno Berselli_, Sep 04 2012]
Links
- V. Raman, Table of n, a(n) for n = 1..10000
Programs
-
Magma
[n: n in [1..200] | IsOne(#PrimesInInterval(10*n, 10*n+9))]; // Bruno Berselli, Sep 04 2012
-
Mathematica
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 *) Select[Range[200],PrimePi[10#+9]-PrimePi[10#]==1&] (* Harvey P. Dale, Feb 04 2015 *)
-
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
-
Python
from itertools import count, islice from sympy import isprime def A216292_gen(startvalue=1): # generator of terms >= startvalue return filter(lambda k: sum(int(isprime(10*k+i)) for i in (1,3,7,9)) == 1, count(max(1,startvalue))) A216292_list = list(islice(A216292_gen(),30)) # Chai Wah Wu, Sep 23 2022
Formula
a(n) ~ 0.1 n log n. - Charles R Greathouse IV, Sep 07 2012
a(n) = floor(A078494(n) / 10). - Charles R Greathouse IV, Sep 07 2012
Comments