This is only a partial answer. Write $r_{0}(n):=\inf\{r\geq 0,(n-r,n+r)\in\mathbb{P}^{2}\}$, which is well defined whenever $n>1$ if you assume Goldbach's conjecture. Then if I'm not mistaken $r_{0}(n)$ is reached when you apply this algorithm recursively: $u_{0}(n):=0$ and $u_{k+1}(n):=u_{k}(n)+2^{1_{2\not\mid n}}.3^{1_{3\not\mid n}}\frac{(\Omega(n-u_{k}(n))+\Omega(n+u_{k}(n)-2))+\vert\Omega(n-u_{k}(n))-\Omega(n+u_{k}(n))\vert}{2}$ and the latter fraction equals $0$. If you can prove rigorously that this algorithm stops in $O((\log n)^2)$ steps, you're done.
Sylvain JULIEN
- 7k
- 3
- 31
- 66