A385780 Primes having only {1, 5, 8} as digits.
5, 11, 151, 181, 811, 881, 1151, 1181, 1511, 1811, 5581, 5851, 5881, 8111, 8581, 11551, 15511, 15551, 15581, 15881, 18181, 51151, 51511, 51551, 51581, 55511, 58111, 58151, 58511, 81181, 81551, 88811, 111581, 115151, 115811, 155581, 155851, 158551, 158581
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 5, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 5, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 5, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("158"), 41))) # uses function/imports in A385776