A386168 Primes having only {2, 7, 8, 9} as digits.
2, 7, 29, 79, 89, 97, 227, 229, 277, 727, 787, 797, 827, 829, 877, 887, 929, 977, 997, 2287, 2297, 2729, 2777, 2789, 2797, 2879, 2887, 2897, 2927, 2999, 7229, 7297, 7727, 7789, 7829, 7877, 7879, 7927, 8287, 8297, 8779, 8887, 8929, 8999, 9227, 9277, 9787, 9829
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [2, 7, 8, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{2, 7, 8, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [2, 7, 8, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("2789"), 41))) # uses function/imports in A385776