The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A024781 Every suffix prime and no 0 digits in base 6 (written in base 6). 8

%I #17 Apr 27 2022 13:34:29

%S 2,3,5,15,25,35,45,115,125,135,215,225,245,335,345,435,445,515,525,

%T 1115,1125,1245,1335,1345,1435,1445,2115,2135,2225,2335,2345,2435,

%U 3125,3445,3515,4115,4215,4225,4435,4525,5215,5245,5345,5525,11115,11245,12135

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

%C The final term is a(454) = 14141511414451435.

%H Nathaniel Johnston, <a href="/A024781/b024781.txt">Table of n, a(n) for n = 1..454</a> (full sequence)

%p a:=[[2], [3], [5]]: b:=[]: l1:=1: l2:=5: do for j from l1 to l2 do for k from 1 to 5 do d:=[op(a[j]),k]: if(isprime(op(convert(d, base, 6, 6^nops(d)))))then a:=[op(a), d]: fi: od: od: l1:=l2+1: l2:=nops(a): if(l1>l2)then break: fi: od: for j from 1 to nops(a) do b:=[op(b),op(convert(a[j], base, 10, 10^nops(a[j])))]: od: b:=sort(b): seq(b[j],j=1..nops(b)); # _Nathaniel Johnston_, Jun 21 2011

%o (Python)

%o from sympy import isprime

%o def afull():

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

%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 "12345")

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

%o return alst

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

%Y Cf. A024779, A024780, A024781, A024782, A024783, 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 May 17 12:26 EDT 2024. Contains 372600 sequences. (Running on oeis4.)