Under Goldbach's conjecture, let $r_{0}(n) : =\inf\{r>0,(n-r,n+r)\in\mathbb{P}^{2}\} $ and $k_{0}(n) : =\pi(n+r_{0}(n))-\pi(n-r_{0}(n)) $. The PNT implies that one can expect to have $ \dfrac{2r_{0}(n)-1}{k_{0}(n)}\sim\log n $.
As for all $ n>1 $ one has $ \tau(n)\geq 2 $, the equality occurring exactly whenever $ n $ is prime, a very good approximation (actually, a tight upper bound) of $ k_{0}(n) $ is given by the function $ S_{r_{0}(n)}(n) $ where $ S_{r}(n) : =\left(\sum_{m=n-r}^{n+r}\dfrac{2^m}{\tau(m)^m}\right)-\frac{1}{2} $.
Can one prove that $ r_{0}(n) $ is the positive integer $ r $ that minimizes the quantity $ \vert S_{r}(n)-\dfrac{2r-1}{\log n}\vert $? If yes, can one get an upper bound for $ r_{0}(n) $ in terms of $ n $?