A386331 Primes without {1, 5} as digits.
2, 3, 7, 23, 29, 37, 43, 47, 67, 73, 79, 83, 89, 97, 223, 227, 229, 233, 239, 263, 269, 277, 283, 293, 307, 337, 347, 349, 367, 373, 379, 383, 389, 397, 409, 433, 439, 443, 449, 463, 467, 479, 487, 499, 607, 643, 647, 673, 677, 683, 709, 727, 733, 739, 743, 769
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [0, 2, 3, 4, 6, 7, 8, 9]];
-
Maple
f:= n-> (l-> add([0, $2..4, $6..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, 1] == 0 && DigitCount[#, 10, 5] == 0 &]
-
PARI
primes_with(, 1, [0, 2, 3, 4, 6, 7, 8, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("02346789"), 41))) # uses function/imports in A385776