A385788 Primes having only {2, 6, 9} as digits.
2, 29, 229, 269, 929, 2269, 2699, 2969, 2999, 6229, 6269, 6299, 9629, 9929, 22229, 22669, 22699, 26669, 26699, 29269, 29629, 29669, 62299, 62929, 62969, 66629, 69929, 92269, 92669, 92699, 96269, 99929, 222269, 226669, 229699, 266269, 266999, 292969, 296269
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [2, 6, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{2, 6, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [2, 6, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("269"), 41))) # uses function/imports in A385776