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!)
A368214 Primes with a single 0-bit in binary expansion such that changing the position of the 0-bit always gives a nonprime (including the one with a leading zero). 0
2, 2039, 6143, 522239, 33546239, 260046847, 16911433727, 32212254719, 2196875771903, 140735340871679, 2251799813685119, 9005000231485439, 576460752169205759, 36893488147410714623, 147573811852188057599, 9444732965739282038783, 154742504910672534362390399 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
It seems that most of the terms end with '9', followed by those ending with '3', '7', and '1'.
LINKS
EXAMPLE
2 is a term because 2 is a prime with one '0' in binary form ('10') and '01' is not a prime. 2039 is a term because 2039 is a prime with one '0' in binary form ('11111110111') and changing the position of the '0', for example, '11111111011' = 2043 and '01111111111' = 1023, always results in a composite.
PROG
(Python)
from sympy import isprime
for n in range(1, 100):
s = n*'1'; c = 0
for j in range(n+1):
num = int(s[:j]+'0'+s[j:], 2)
if isprime(num):
c += 1
if c == 1: r = num
if c == 2: break
if c == 1: print(r, end = ', ')
CROSSREFS
Subsequence of A095078.
Sequence in context: A125635 A124361 A166339 * A024034 A101722 A004908
KEYWORD
base,nonn
AUTHOR
Ya-Ping Lu, Dec 23 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 June 8 05:45 EDT 2024. Contains 373207 sequences. (Running on oeis4.)