OFFSET
1,1
COMMENTS
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Chris Caldwell, Naughty prime, Prime Pages' Glossary (UTM). (Date?)
FORMULA
a(n) ~ n log n: almost all primes are in this sequence. - Charles R Greathouse IV, Jul 24 2012
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)]
print(aupto(1910)) # Michael S. Branicky, Mar 11 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Robert G. Wilson v, Aug 10 2000
STATUS
approved