A386193 Primes having only {4, 6, 7, 8} as digits.
7, 47, 67, 467, 487, 647, 677, 787, 877, 887, 4447, 4787, 4877, 7477, 7487, 7687, 7867, 7877, 8447, 8467, 8647, 8677, 8747, 8867, 8887, 44647, 44687, 44777, 44867, 44887, 46447, 46477, 46687, 46747, 46867, 46877, 47777, 48487, 48647, 48677, 48767, 48787, 48847
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [4, 6, 7, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{4, 6, 7, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [4, 6, 7, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("4678"), 41))) # uses function/imports in A385776