|
|
A351826
|
|
a(n) is the least k such that there are exactly n positive numbers j such that k - 2^j and k + 2^j are both prime.
|
|
1
|
|
|
1, 5, 9, 15, 75, 165, 16065, 137445, 540645, 2222535, 374958045, 18327149295
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
All terms are odd. If the number j is allowed to be 0, then a(1) = 4. - Chai Wah Wu, Mar 24 2022
|
|
LINKS
|
|
|
EXAMPLE
|
a(4) = 75 because 75 +/- 2^2 = 79 and 71, 75 +/- 2^3 = 83 and 67, 75 +/- 2^5 = 107 and 43, and 75 +/- 2^6 = 139 and 11 are all prime, and 75 is the least number for which there are exactly 4 such powers of 2.
|
|
MAPLE
|
f:= proc(n) local t, s:
nops(select(t -> isprime(n+2^t) and isprime(n-2^t), [$1..ilog2(n)]));
end proc:
V:= Array(0..10): count:= 0:
for n from 1 while count < 11 do
v:= f(n); if V[v] = 0 then V[v] := n; count:= count+1 fi
od:
convert(V, list);
|
|
PROG
|
(Python)
from itertools import count
from sympy import isprime
for k in count(1, 2):
c = 0
for j in count(1):
if k-2**j < 2:
break
if isprime(k-2**j) and isprime(k+2**j):
c += 1
if c > n:
break
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|