OFFSET
1,2
COMMENTS
Conjecture: sqrt(2*a(n)) > sqrt(p_n)-0.7 for all n > 0, and a(n) is even for any n > 7.
Note that f(n) = sqrt(2*a(n))-sqrt(p_n)+0.7 is approximately equal to 0.000864 at n = 651. It seems that f(n) > 0.1 for any other value of n.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Zhi-Wei Sun, On functions taking only prime values, J. Number Theory 133(2013), 2794-2812.
EXAMPLE
a(4) = 6, since 2,3,5,7 are the initial four primes, and 1=3-2, 2=5-3, 3=7-5+3-2, 4=5-3+2, 5=7-5+3.
MATHEMATICA
s[0_]:=0
s[n_]:=s[n]=Prime[n]-s[n-1]
R[j_]:=R[j]=Union[Table[s[j]-(-1)^(j-i)*s[i], {i, 0, j-2}]]
t=1
Do[Do[Do[If[MemberQ[R[j], m]==True, Goto[aa]], {j, PrimePi[m]+1, n}]; Print[n, " ", m]; t=m; Goto[bb];
Label[aa]; Continue, {m, t, Prime[n]-1}]; Print[n, " ", counterexample]; Label[bb], {n, 1, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, May 27 2013
STATUS
approved