A386091 Primes having only {1, 2, 4, 5} as digits.
2, 5, 11, 41, 151, 211, 241, 251, 421, 521, 541, 1151, 1451, 1511, 2111, 2141, 2221, 2251, 2411, 2441, 2521, 2551, 4111, 4211, 4241, 4421, 4441, 4451, 5441, 5521, 11251, 11411, 11551, 12211, 12241, 12251, 12421, 12451, 12511, 12541, 14221, 14251, 14411, 14551
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 2, 4, 5]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 2, 4, 5}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 2, 4, 5]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1245"), 41))) # uses function/imports in A385776