A386118 Primes having only {1, 3, 8, 9} as digits.
3, 11, 13, 19, 31, 83, 89, 113, 131, 139, 181, 191, 193, 199, 311, 313, 331, 383, 389, 811, 839, 881, 883, 911, 919, 983, 991, 1181, 1193, 1319, 1381, 1399, 1811, 1831, 1889, 1913, 1931, 1933, 1993, 1999, 3119, 3181, 3191, 3313, 3319, 3331, 3389, 3391, 3833, 3881
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 3, 8, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 3, 8, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 3, 8, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1389"), 41))) # uses function/imports in A385776