A386195 Primes having only {4, 7, 8, 9} as digits.
7, 47, 79, 89, 97, 449, 479, 487, 499, 787, 797, 877, 887, 947, 977, 997, 4447, 4787, 4789, 4799, 4877, 4889, 4987, 4999, 7477, 7487, 7489, 7499, 7789, 7877, 7879, 7949, 8447, 8747, 8779, 8849, 8887, 8999, 9479, 9497, 9749, 9787, 9887, 9949, 44449, 44497, 44777
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [4, 7, 8, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{4, 7, 8, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [4, 7, 8, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("4789"), 41))) # uses function/imports in A385776