A386340 Primes without {3, 4} as digits.
2, 5, 7, 11, 17, 19, 29, 59, 61, 67, 71, 79, 89, 97, 101, 107, 109, 127, 151, 157, 167, 179, 181, 191, 197, 199, 211, 227, 229, 251, 257, 269, 271, 277, 281, 509, 521, 557, 569, 571, 577, 587, 599, 601, 607, 617, 619, 659, 661, 677, 691, 701, 709, 719, 727, 751
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [0, 1, 2, 5, 6, 7, 8, 9]];
-
Maple
f:= n-> (l-> add([$0..2, $5..9][l[j]+1]*10^(j-1), j=1..nops(l)))(convert(n, base, 8)): select(isprime, [seq(f(i), i=0..600)])[]; # Alois P. Heinz, Jul 19 2025
-
Mathematica
Select[Prime[Range[120]], DigitCount[#, 10, 3] == 0 && DigitCount[#, 10, 4] == 0 &]
-
PARI
primes_with(, 1, [0, 1, 2, 5, 6, 7, 8, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("01256789"), 41))) # uses function/imports in A385776