login
A386056
Primes having only {0, 3, 4, 5} as digits.
1
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,1
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]
PROG
(Magma) [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [0, 3, 4, 5]];
(Python) print(list(islice(primes_with("0345"), 41))) # uses function/imports in A385776
(PARI) primes_with(, 1, [0, 3, 4, 5]) \\ uses function in A385776
CROSSREFS
Supersequence of A199340, A199345, A260223.
Sequence in context: A386172 A386171 A386169 * A199345 A384972 A062633
KEYWORD
nonn,base,easy
AUTHOR
Jason Bard, Jul 15 2025
STATUS
approved