login
A386331
Primes without {1, 5} as digits.
1
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,1
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 &]
PROG
(Magma) [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [0, 2, 3, 4, 6, 7, 8, 9]];
(Python) print(list(islice(primes_with("02346789"), 41))) # uses function/imports in A385776
(PARI) primes_with(, 1, [0, 2, 3, 4, 6, 7, 8, 9]) \\ uses function in A385776
CROSSREFS
Intersection of A038603 and A038613.
Sequence in context: A156615 A158054 A134412 * A386151 A385225 A005115
KEYWORD
nonn,base,easy
AUTHOR
Jason Bard, Jul 19 2025
STATUS
approved