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”).

A024783
Every suffix prime and no 0 digits in base 8 (written in base 8).
8
2, 3, 5, 7, 13, 15, 23, 27, 35, 37, 45, 53, 57, 65, 73, 75, 123, 145, 153, 213, 227, 235, 265, 323, 337, 345, 357, 373, 415, 445, 475, 513, 535, 557, 565, 573, 615, 645, 657, 673, 715, 723, 737, 753, 775, 1145, 1153, 1357, 1475, 1737, 1775, 2213, 2235, 2535, 3123, 3145
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
STATUS
approved