A386110 Primes having only {1, 3, 5, 6} as digits.
3, 5, 11, 13, 31, 53, 61, 113, 131, 151, 163, 311, 313, 331, 353, 563, 613, 631, 653, 661, 1151, 1153, 1163, 1361, 1511, 1531, 1553, 1613, 1663, 3163, 3313, 3331, 3361, 3511, 3533, 3613, 3631, 5113, 5153, 5333, 5351, 5531, 5563, 5651, 5653, 6113, 6131, 6133, 6151
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 3, 5, 6]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 3, 5, 6}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 3, 5, 6]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1356"), 41))) # uses function/imports in A385776