A386115 Primes having only {1, 3, 6, 8} as digits.
3, 11, 13, 31, 61, 83, 113, 131, 163, 181, 311, 313, 331, 383, 613, 631, 661, 683, 811, 863, 881, 883, 1163, 1181, 1361, 1381, 1613, 1663, 1811, 1831, 1861, 3163, 3181, 3313, 3331, 3361, 3613, 3631, 3833, 3863, 3881, 6113, 6131, 6133, 6163, 6311, 6361, 6661, 6833
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 3, 6, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 3, 6, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 3, 6, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1368"), 41))) # uses function/imports in A385776