OFFSET
1,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
MATHEMATICA
Select[Prime[Range[2 10^5]], Complement[IntegerDigits[#], {0, 5, 7}]=={} &]
PROG
(Magma) [p: p in PrimesUpTo(2*10^6) | Set(Intseq(p)) subset [0, 5, 7]];
(Python)
from sympy import isprime
from sympy.utilities.iterables import multiset_permutations
def aupton(terms):
n, digits, alst = 0, 1, []
while len(alst) < terms:
mpstr = "".join(d*digits for d in "057")
for mp in multiset_permutations(mpstr, digits):
if mp[0] == "0": continue
t = int("".join(mp))
if isprime(t): alst.append(t)
if len(alst) == terms: break
else: digits += 1
return alst
print(aupton(38)) # Michael S. Branicky, May 07 2021
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Vincenzo Librandi, Aug 01 2015
STATUS
approved