A386155 Primes having only {2, 4, 6, 7} as digits.
2, 7, 47, 67, 227, 277, 467, 647, 677, 727, 2267, 2447, 2467, 2477, 2647, 2677, 2767, 2777, 4447, 6247, 6277, 6427, 7247, 7477, 7727, 22247, 22277, 22447, 22727, 22777, 24247, 24677, 24767, 26227, 26267, 26627, 26647, 26777, 27277, 27427, 27647, 27767, 42227
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [2, 4, 6, 7]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{2, 4, 6, 7}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [2, 4, 6, 7]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("2467"), 41))) # uses function/imports in A385776