A385797 Primes having only {5, 6, 9} as digits.
5, 59, 569, 599, 659, 5569, 5659, 5669, 6569, 6599, 6659, 6959, 56569, 56599, 56659, 56999, 59659, 59669, 59699, 59999, 65599, 65699, 66569, 66959, 69959, 95569, 95959, 96959, 99559, 556559, 556999, 565559, 566659, 566999, 569599, 569659, 596569, 596599, 596669
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [5, 6, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{5, 6, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [5, 6, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("569"), 41))) # uses function/imports in A385776