A386163 Primes having only {2, 5, 7, 9} as digits.
2, 5, 7, 29, 59, 79, 97, 227, 229, 257, 277, 557, 577, 599, 727, 757, 797, 929, 977, 997, 2297, 2557, 2579, 2729, 2777, 2797, 2927, 2957, 2999, 5227, 5279, 5297, 5527, 5557, 5779, 5927, 7229, 7297, 7529, 7559, 7577, 7727, 7757, 7759, 7927, 9227, 9257, 9277, 9929
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [2, 5, 7, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{2, 5, 7, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [2, 5, 7, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("2579"), 41))) # uses function/imports in A385776