A385795 Primes having only {4, 7, 8} as digits.
7, 47, 487, 787, 877, 887, 4447, 4787, 4877, 7477, 7487, 7877, 8447, 8747, 8887, 44777, 44887, 47777, 48487, 48787, 48847, 74747, 74887, 77447, 77477, 77747, 78487, 78787, 78877, 78887, 84787, 87877, 87887, 88747, 444487, 444877, 444887, 447877, 474787, 474847
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [4, 7, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{4, 7, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [4, 7, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("478"), 41))) # uses function/imports in A385776