A385783 Primes having only {1, 8, 9} as digits.
11, 19, 89, 181, 191, 199, 811, 881, 911, 919, 991, 1181, 1811, 1889, 1999, 8111, 8191, 8819, 8999, 9181, 9199, 9811, 11119, 11981, 18119, 18181, 18191, 18199, 18899, 18911, 18919, 19181, 19819, 19889, 19891, 19919, 19991, 81119, 81181, 81199, 81899, 81919
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 8, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 8, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 8, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("189"), 41))) # uses function/imports in A385776