A386117 Primes having only {1, 3, 7, 8} as digits.
3, 7, 11, 13, 17, 31, 37, 71, 73, 83, 113, 131, 137, 173, 181, 311, 313, 317, 331, 337, 373, 383, 733, 773, 787, 811, 877, 881, 883, 887, 1117, 1171, 1181, 1187, 1373, 1381, 1733, 1777, 1783, 1787, 1811, 1831, 1871, 1873, 1877, 3137, 3181, 3187, 3313, 3331, 3371
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 3, 7, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 3, 7, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 3, 7, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1378"), 41))) # uses function/imports in A385776