A386126 Primes having only {1, 4, 7, 8} as digits.
7, 11, 17, 41, 47, 71, 181, 487, 787, 811, 877, 881, 887, 1117, 1171, 1181, 1187, 1447, 1471, 1481, 1487, 1741, 1747, 1777, 1787, 1811, 1847, 1871, 1877, 4111, 4177, 4441, 4447, 4481, 4787, 4817, 4871, 4877, 7177, 7187, 7411, 7417, 7477, 7481, 7487, 7717, 7741
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 4, 7, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 4, 7, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 4, 7, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1478"), 41))) # uses function/imports in A385776