A385784 Primes having only {2, 4, 7} as digits.
2, 7, 47, 227, 277, 727, 2447, 2477, 2777, 4447, 7247, 7477, 7727, 22247, 22277, 22447, 22727, 22777, 24247, 27277, 27427, 42227, 42727, 44777, 47777, 72227, 72277, 72727, 74747, 77447, 77477, 77747, 222247, 242227, 242447, 242747, 244247, 244747, 272227
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [2, 4, 7]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{2, 4, 7}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [2, 4, 7]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("247"), 41))) # uses function/imports in A385776