A386116 Primes having only {1, 3, 6, 9} as digits.
3, 11, 13, 19, 31, 61, 113, 131, 139, 163, 191, 193, 199, 311, 313, 331, 613, 619, 631, 661, 691, 911, 919, 991, 1163, 1193, 1319, 1361, 1399, 1613, 1619, 1663, 1669, 1693, 1699, 1913, 1931, 1933, 1993, 1999, 3119, 3163, 3169, 3191, 3313, 3319, 3331, 3361, 3391
Offset: 1
Links
Programs
-
Magma
[p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 3, 6, 9]];
-
Mathematica
Flatten[Table[Select[FromDigits /@ Tuples[{1, 3, 6, 9}, n], PrimeQ], {n, 7}]]
-
PARI
primes_with(, 1, [1, 3, 6, 9]) \\ uses function in A385776
-
Python
print(list(islice(primes_with("1369"), 41))) # uses function/imports in A385776