login
A385773
Primes having only {1, 2, 5} as digits.
8
2, 5, 11, 151, 211, 251, 521, 1151, 1511, 2111, 2221, 2251, 2521, 2551, 5521, 11251, 11551, 12211, 12251, 12511, 15121, 15511, 15551, 21121, 21211, 21221, 21521, 22111, 22511, 25111, 25121, 51151, 51511, 51521, 51551, 52121, 52511, 55511, 111121, 111211
OFFSET
1,1
MATHEMATICA
Flatten[Table[ Select[FromDigits /@ Tuples[{1, 2, 5}, n], PrimeQ], {n, 7}]]
PROG
(Magma) [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [1, 2, 5]];
(Python) print(list(islice(primes_with("125"), 41))) # uses function/imports in A385776
(PARI) primes_with(, 1, [1, 2, 5]) \\ uses function in A385776
CROSSREFS
Supersequence of A024050, A020453.
Sequence in context: A239900 A123165 A386097 * A098438 A225955 A376768
KEYWORD
nonn,base,easy
AUTHOR
Jason Bard, Jul 09 2025
STATUS
approved