A386196 Primes having only {5, 6, 7, 8} as digits.
5, 7, 67, 557, 577, 587, 677, 757, 787, 857, 877, 887, 5557, 5657, 5857, 5867, 6577, 6857, 7577, 7687, 7757, 7867, 7877, 8677, 8867, 8887, 55667, 55787, 56687, 56767, 56857, 57557, 57587, 57667, 57787, 58567, 58657, 58687, 58757, 58787, 65557, 65587, 65657, 65677
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [5, 6, 7, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{5, 6, 7, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [5, 6, 7, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("5678"), 41))) # uses function/imports in A385776