A386121 Primes having only {1, 4, 5, 8} as digits.
5, 11, 41, 151, 181, 541, 811, 881, 1151, 1181, 1451, 1481, 1511, 1811, 4111, 4441, 4451, 4481, 5441, 5581, 5851, 5881, 8111, 8581, 11411, 11551, 14411, 14551, 14851, 15451, 15511, 15541, 15551, 15581, 15881, 18181, 18451, 18481, 18541, 41141, 41411, 41851, 44111
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 4, 5, 8]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 4, 5, 8}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 4, 5, 8]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1458"), 41))) # uses function/imports in A385776