A386129 Primes having only {1, 5, 6, 7} as digits.
5, 7, 11, 17, 61, 67, 71, 151, 157, 167, 557, 571, 577, 617, 661, 677, 751, 757, 761, 1117, 1151, 1171, 1511, 1567, 1571, 1657, 1667, 1777, 5167, 5171, 5557, 5651, 5657, 5711, 5717, 6151, 6551, 6571, 6577, 6661, 6761, 7151, 7177, 7517, 7561, 7577, 7717, 7757
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 5, 6, 7]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 5, 6, 7}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 5, 6, 7]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1567"), 41))) # uses function/imports in A385776