A386122 Primes having only {1, 4, 5, 9} as digits.
5, 11, 19, 41, 59, 149, 151, 191, 199, 419, 449, 491, 499, 541, 599, 911, 919, 941, 991, 1151, 1451, 1459, 1499, 1511, 1549, 1559, 1949, 1951, 1999, 4111, 4159, 4441, 4451, 4519, 4549, 4591, 4919, 4951, 4999, 5119, 5419, 5441, 5449, 5519, 5591, 9151, 9199, 9419
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 4, 5, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 4, 5, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 4, 5, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1459"), 41))) # uses function/imports in A385776