A386104 Primes having only {1, 2, 8, 9} as digits.
2, 11, 19, 29, 89, 181, 191, 199, 211, 229, 281, 811, 821, 829, 881, 911, 919, 929, 991, 1129, 1181, 1229, 1289, 1291, 1811, 1889, 1999, 2111, 2129, 2221, 2281, 2819, 2999, 8111, 8191, 8219, 8221, 8291, 8819, 8821, 8929, 8999, 9181, 9199, 9221, 9281, 9811, 9829
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 2, 8, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 2, 8, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 2, 8, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1289"), 41))) # uses function/imports in A385776