A386135 Primes having only {1, 6, 7, 8} as digits.
7, 11, 17, 61, 67, 71, 167, 181, 617, 661, 677, 761, 787, 811, 877, 881, 887, 1117, 1171, 1181, 1187, 1667, 1777, 1787, 1811, 1861, 1867, 1871, 1877, 6661, 6761, 6781, 6871, 7177, 7187, 7681, 7687, 7717, 7817, 7867, 7877, 8111, 8117, 8161, 8167, 8171, 8677, 8681
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 6, 7, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 6, 7, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 6, 7, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1678"), 41))) # uses function/imports in A385776