|
|
A213982
|
|
Least k >= 1 such that prime(n) +- k = 2^m * q, m >= 0, where q >= 2 is prime.
|
|
2
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 2, 2, 3, 1, 1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 1, 3, 1, 2, 1, 1, 1, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,20
|
|
COMMENTS
|
What one can say about the average behavior of a(n) for large n? It is interesting in view of the Broughan-Qizhi inequality A192869(n) >> n*(log(n))^2 and their conjecture that A192869(n) = O(n*(log(n))^2). But in the case of A213982 we have, on average, log(n) possible odd positive and negative values of k with |k| < min (p_n-p_(n-1, p_(n+1)-p_n) which is approximately log(n).
Therefore, we conjecture that, on average, a(n) is approximately c*log(n) with c in (0,1). Calculations up to 10^6 (Peter J. C. Moses) show that, most likely, c < 0.298.
|
|
LINKS
|
|
|
EXAMPLE
|
a(1)=1, since 2+1 = 3 = 2^0*3;
a(2)=1, since 3+1 = 2^1*2;
a(7)=1, since 17-1 = 16 = 2^3*2;
a(10)=1, since 29-1 = 28 = 2^2*7.
|
|
MAPLE
|
f:= proc(n) local p, q, k, t;
p:= ithprime(n);
for k from 1 do
for t in [p+k, p-k] do
q:= t/2^padic:-ordp(t, 2);
if q=1 or isprime(q) then return k fi
od
od
end proc:
|
|
MATHEMATICA
|
Table[NestWhile[#+1&, 1, Not[Apply[Or, Flatten[PrimeQ[Map[(Prime[n] + #)/(2^Range[0, Floor[Log[Prime[n]]/Log[2]]])&, {-#, #}]]]]]&], {n, 100}] (* Peter J. C. Moses, Jul 09 2012 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|