login
A385768
Primes having only {0, 4, 9} as digits.
12
409, 449, 499, 4049, 4099, 4409, 4909, 4999, 9049, 9949, 40009, 40099, 40499, 40949, 44449, 44909, 49009, 49409, 49499, 49999, 90499, 94009, 94049, 94099, 94949, 94999, 99409, 400009, 400409, 400949, 404009, 404099, 404449, 409099, 409499, 409909, 409999
OFFSET
1,1
EXAMPLE
4099 is a term because it is prime, and it only contains {0,4,9}.
MATHEMATICA
Select[FromDigits/@Tuples[{0, 4, 9}, 5], PrimeQ]
PROG
(Magma) [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [0, 4, 9]];
(Python) print(list(islice(primes_with("049"), 41))) # uses function/imports in A385776
(PARI) primes_with(, 1, [0, 4, 9]) \\ uses function in A385776
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Jason Bard, Jul 09 2025
STATUS
approved