A386138 Primes having only {1, 7, 8, 9} as digits.
7, 11, 17, 19, 71, 79, 89, 97, 179, 181, 191, 197, 199, 719, 787, 797, 811, 877, 881, 887, 911, 919, 971, 977, 991, 997, 1117, 1171, 1181, 1187, 1777, 1787, 1789, 1811, 1871, 1877, 1879, 1889, 1979, 1987, 1997, 1999, 7177, 7187, 7717, 7789, 7817, 7877, 7879, 7919
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 7, 8, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 7, 8, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 7, 8, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1789"), 41))) # uses function/imports in A385776