Assuming Goldbach's conjecture, let's define for a sufficiently large integer $ n $ the quantity $ r\_{0}(n) : =\inf\{r\geq 0,(n-r,n+r)\in\mathbb{P}^{2}\} $.


Under GRH, what is the best upper bound for $ R(x) : =\sum\_{n\leq x}r\_{0}(n) $? 



Upper bound for $\sum r_{0}(n)$
By a result of Jia (Three primes theorem in a short interval. VII., Acta Math. Sinica (N.S.) 10 (1994), 369-387), we have for any $\epsilon>0$,
$$\#\{n\leq x:\ r\_0(n)>x^{7/12+\epsilon}\}\ll\frac{x}{\log^2 x}. $$
As a consequence, we have the uniform bound (under the Goldbach conjecture)
$$R(x)\ll\frac{x^2}{\log^2 x}.$$
I believe that with current technology one can also establish, for some small but effective $\delta>0$,
$$\#\{n\leq x:\ r\_0(n)>x^{1-\delta}\}\ll x^{1-\delta}.$$
This would yield (under the Goldbach conjecture) the stronger bound $R(x)\ll x^{2-\delta}$.


**Added.** Baker and Harman (The three primes theorem with almost equal summands, R. Soc. Lond. Philos. Trans. Ser. A Math. Phys. Eng. Sci. 356 (1998), no. 1738, 763–780) improved the exponent $7/12+\epsilon$ above to $4/7$. 


