OFFSET
1,1
COMMENTS
The final term of the sequence is a(446) = 313636165537775.
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..446 (full sequence)
MAPLE
a:=[[2], [3], [5], [7]]: l1:=1: l2:=4: do for k from 1 to 7 do for j from l1 to l2 do d:=[op(a[j]), k]: if(isprime(op(convert(d, base, 8, 8^nops(d)))))then a:=[op(a), d]: fi: od: od: l1:=l2+1: l2:=nops(a): if(l1>l2)then break: fi: od: seq(op(convert(a[j], base, 10, 10^nops(a[j]))), j=1..nops(a)); # Nathaniel Johnston, Jun 21 2011
PROG
(Python)
from sympy import isprime
def afull():
prime_strings, alst = list("2357"), []
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 "1234567")
prime_strings = [c for c in candidates if isprime(int(c, 8))]
return alst
print(afull()) # Michael S. Branicky, Apr 27 2022
CROSSREFS
KEYWORD
nonn,base,easy,fini,full
AUTHOR
STATUS
approved