login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A024783 Every suffix prime and no 0 digits in base 8 (written in base 8). 8

%I #17 Apr 27 2022 13:35:31

%S 2,3,5,7,13,15,23,27,35,37,45,53,57,65,73,75,123,145,153,213,227,235,

%T 265,323,337,345,357,373,415,445,475,513,535,557,565,573,615,645,657,

%U 673,715,723,737,753,775,1145,1153,1357,1475,1737,1775,2213,2235,2535,3123,3145

%N Every suffix prime and no 0 digits in base 8 (written in base 8).

%C The final term of the sequence is a(446) = 313636165537775.

%H Nathaniel Johnston, <a href="/A024783/b024783.txt">Table of n, a(n) for n = 1..446</a> (full sequence)

%p 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

%o (Python)

%o from sympy import isprime

%o def afull():

%o prime_strings, alst = list("2357"), []

%o while len(prime_strings) > 0:

%o alst.extend(sorted(int(p) for p in prime_strings))

%o candidates = set(d+p for p in prime_strings for d in "1234567")

%o prime_strings = [c for c in candidates if isprime(int(c, 8))]

%o return alst

%o print(afull()) # _Michael S. Branicky_, Apr 27 2022

%Y Cf. A024779, A024780, A024781, A024782, A024784, A024785.

%K nonn,base,easy,fini,full

%O 1,1

%A _David W. Wilson_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)