login
A386026
Primes having only {0, 1, 3, 9} as digits.
1
3, 11, 13, 19, 31, 101, 103, 109, 113, 131, 139, 191, 193, 199, 311, 313, 331, 911, 919, 991, 1009, 1013, 1019, 1031, 1033, 1039, 1091, 1093, 1103, 1109, 1193, 1301, 1303, 1319, 1399, 1901, 1913, 1931, 1933, 1993, 1999, 3001, 3011, 3019, 3109, 3119, 3191, 3301
OFFSET
1,1
COMMENTS
Primes that only contain digits that are 0 or integer powers of 3.
MATHEMATICA
Select[FromDigits /@ Tuples[{0, 1, 3, 9}, n], PrimeQ]
PROG
(Magma) [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [0, 1, 3, 9]];
(Python) print(list(islice(primes_with("0139"), 41))) # uses function/imports in A385776
(PARI) primes_with(, 1, [0, 1, 3, 9]) \\ uses function in A385776
CROSSREFS
Supersequence of A199329, A260044, A329761.
Sequence in context: A386116 A386118 A066594 * A329761 A167612 A299974
KEYWORD
nonn,base,easy
AUTHOR
Jason Bard, Jul 14 2025
STATUS
approved