A385781 Primes having only {1, 5, 9} as digits.
5, 11, 19, 59, 151, 191, 199, 599, 911, 919, 991, 1151, 1511, 1559, 1951, 1999, 5119, 5519, 5591, 9151, 9199, 9511, 9551, 11119, 11159, 11519, 11551, 11959, 15199, 15511, 15551, 15559, 15919, 15959, 15991, 19559, 19919, 19991, 51151, 51199, 51511, 51551
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 5, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 5, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 5, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("159"), 41))) # uses function/imports in A385776