login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A024780
Every suffix prime and no 0 digits in base 5 (written in base 5).
7
2, 3, 12, 23, 32, 43, 232, 243, 412, 423, 2232, 4412, 4423, 22232, 222232
OFFSET
1,1
PROG
(Python)
from sympy import isprime
def afull():
prime_strings, alst = list("23"), []
while len(prime_strings) > 0:
alst.extend(sorted(int(p) for p in prime_strings))
candidates = set(d+p for p in prime_strings for d in "1234")
prime_strings = [c for c in candidates if isprime(int(c, 5))]
return alst
print(afull()) # Michael S. Branicky, Apr 27 2022
CROSSREFS
KEYWORD
nonn,base,fini,full
STATUS
approved