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!)
A361312 Smallest prime p such that the decimal expansion of p remains prime through exactly n iterations of base-10 to base-2 conversion (A007088). 0
2, 3, 5, 3893257, 9632552297 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
Prime numbers that remain primes after 1, 2, 3, and 4 iterations are A065720, A123266, A256621 and A256622, respectively.
LINKS
Carlos Rivera, Puzzle 280. 3893257, The Prime Puzzles & Problems Connection.
EXAMPLE
a(0) = 2 because prime number 2 in base 2 is 10, and 10 in base 10 is not a prime.
a(1) = 3 because 3 = 11_2 and 11_10 is a prime. In the second iteration, however, 11_10 = 1011_2 and 1011_10 is not a prime.
a(2) = 5 because 5 = 101_2 and 101_10 = 1100101_2. Both 101 and 1100101 are primes in base 10. In the third iteration, 1100101_10 = 100001100100101000101_2 and 100001100100101000101_10 is not a prime.
PROG
(Python)
from sympy import isprime, nextprime
p = 1; mx = 5; I = [*range(mx)]; R = [*range(mx)]
while I:
p = nextprime(p); ct = 0; q = p
while isprime(int(bin(q)[2:])): ct += 1; q = int(bin(q)[2:])
if ct in I: R[ct] = p; I.remove(ct)
print(*R, sep = ", ")
CROSSREFS
Sequence in context: A357323 A335304 A193888 * A305192 A141186 A078682
KEYWORD
nonn,base,more
AUTHOR
Ya-Ping Lu, Mar 08 2023
STATUS
approved

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 29 10:19 EDT 2024. Contains 372926 sequences. (Running on oeis4.)