|
|
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
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|