A386108 Primes having only {1, 3, 4, 8} as digits.
3, 11, 13, 31, 41, 43, 83, 113, 131, 181, 311, 313, 331, 383, 431, 433, 443, 811, 881, 883, 1181, 1381, 1433, 1481, 1483, 1811, 1831, 3181, 3313, 3331, 3343, 3413, 3433, 3833, 3881, 4111, 4133, 4441, 4481, 4483, 4813, 4831, 8111, 8311, 8431, 8443, 8831, 11113
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 3, 4, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 3, 4, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 3, 4, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1348"), 41))) # uses function/imports in A385776