A056709 Naught-y primes, primes with noughts (or zeros).
101, 103, 107, 109, 307, 401, 409, 503, 509, 601, 607, 701, 709, 809, 907, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1201, 1301, 1303, 1307, 1409, 1601, 1607, 1609, 1709, 1801, 1901, 1907
Offset: 1
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
- Chris Caldwell, Naughty prime, Prime Pages' Glossary (UTM). (Date?)
Crossrefs
Programs
-
Magma
[p:p in PrimesUpTo(2000)|0 in Intseq(p)]; // Marius A. Burtea, Jan 13 2020
-
Mathematica
Select[ Range[ 1, 2500, 2 ], PrimeQ[ # ] && Sort[ RealDigits[ # ][ [ 1 ] ] ][ [ 1 ] ] == 0 & ] (* Second program: *) Select[Prime@ Range@ 300, DigitCount[#, 10, 0] > 0 &] (* Michael De Vlieger, Jan 28 2020 *)
-
PARI
is(n)=isprime(n)&&vecsort(eval(Vec(Str(n))),,8)[1]==0
-
PARI
select( {is_A056709(n)=!vecmin(digits(n))&&isprime(n)}, [1..2000]) \\ Defines the characteristic function is_A; as check & example: select terms in [1..2000]. next_A056709(n)={until(!vecmin(digits(n)), n=nextprime(n+1));n} \\ Successor function: find smallest a(k) > n. Useful to get a vector of consecutive terms: A056709_vec(n,M=99)=M--;vector(n,i,M=next_A056709(M)) \\ get n terms >= M (if given, else start with a(1)). \\ M. F. Hasler, Jan 12 2020
-
Python
from sympy import primerange def aupto(lim): return [p for p in primerange(1, lim+1) if '0' in str(p)] print(aupto(1910)) # Michael S. Branicky, Mar 11 2022
Formula
a(n) ~ n log n: almost all primes are in this sequence. - Charles R Greathouse IV, Jul 24 2012
Comments