A385787 Primes having only {2, 6, 7} as digits.
2, 7, 67, 227, 277, 677, 727, 2267, 2677, 2767, 2777, 6277, 7727, 22277, 22727, 22777, 26227, 26267, 26627, 26777, 27277, 27767, 62627, 67777, 72227, 72277, 72727, 72767, 76667, 76777, 77267, 226267, 226777, 227267, 227627, 262627, 266677, 266767, 267227
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [2, 6, 7]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{2, 6, 7}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [2, 6, 7]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("267"), 41))) # uses function/imports in A385776