A386132 Primes having only {1, 5, 7, 8} as digits.
5, 7, 11, 17, 71, 151, 157, 181, 557, 571, 577, 587, 751, 757, 787, 811, 857, 877, 881, 887, 1117, 1151, 1171, 1181, 1187, 1511, 1571, 1777, 1787, 1811, 1871, 1877, 5171, 5557, 5581, 5711, 5717, 5851, 5857, 5881, 7151, 7177, 7187, 7517, 7577, 7717, 7757, 7817
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 5, 7, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 5, 7, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 5, 7, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1578"), 41))) # uses function/imports in A385776