A386166 Primes having only {2, 6, 7, 9} as digits.
2, 7, 29, 67, 79, 97, 227, 229, 269, 277, 677, 727, 769, 797, 929, 967, 977, 997, 2267, 2269, 2297, 2677, 2699, 2729, 2767, 2777, 2797, 2927, 2969, 2999, 6229, 6269, 6277, 6299, 6679, 6779, 6967, 6977, 6997, 7229, 7297, 7669, 7699, 7727, 7927, 9227, 9277, 9629
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [2, 6, 7, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{2, 6, 7, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [2, 6, 7, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("2679"), 41))) # uses function/imports in A385776