A386056 Primes having only {0, 3, 4, 5} as digits.
3, 5, 43, 53, 353, 433, 443, 503, 3343, 3433, 3533, 4003, 5003, 5303, 5333, 5443, 5503, 30403, 30553, 33053, 33343, 33353, 33403, 33503, 33533, 34033, 34303, 34403, 34543, 35053, 35353, 35533, 35543, 40343, 40433, 40543, 43003, 43403, 43543, 44053, 44453, 44533
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [0, 3, 4, 5]];
-
Maple
f:= n-> (l-> add([0, 3, 4, 5][l[j]+1]*10^(j-1), j=1..nops(l)))(convert(n, base, 4)): select(isprime, [seq(f(i), i=0..695)])[]; # Alois P. Heinz, Jul 15 2025
-
Mathematica
Select[FromDigits /@ Tuples[{0, 3, 4, 5}, n], PrimeQ]
-
PARI
primes_with(, 1, [0, 3, 4, 5]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("0345"), 41))) # uses function/imports in A385776