|
|
A056709
|
|
Naught-y primes, primes with noughts (or zeros).
|
|
20
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
Chris Caldwell, Naughty prime, Prime Pages' Glossary (UTM). (Date?)
|
|
FORMULA
|
|
|
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 *)
|
|
PROG
|
(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
(Magma) [p:p in PrimesUpTo(2000)|0 in Intseq(p)]; // Marius A. Burtea, Jan 13 2020
(Python)
from sympy import primerange
def aupto(lim): return [p for p in primerange(1, lim+1) if '0' in str(p)]
|
|
CROSSREFS
|
Cf. A164968 (Naughty primes: most digits are 0).
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|