Asymptotic expression for $3$ term arithmetic progression in the primes I have found an asymptotic for the following sum using the circle method:
\begin{align}
R(n)=\sum_{\substack{p_1,p_2,p_3 \le n \\p_1+p_2=2p_3 }} \log (p_1) \log (p_2) \log (p_3)=\mathfrak{S}\frac{n^2}{4}+O \left(\frac{n^2}{(\log n)^A}\right),
\end{align}
where $\mathfrak{S} \ge 1$. I am trying to turn this into the following asymptotic estimate for $S(n)$, which counts $3$ term arithmetic progressions in the primes up to $n$:
\begin{align}
S(n):=\sum_{\substack{p_1,p_2,p_3 \le n \\p_1+p_2=2p_3 }} 1 = \mathfrak{S}\frac{n^2}{4 (\log n)^3}+O \left(\frac{n^2}{(\log n)^{A'}}\right).
\end{align}
It is not required that $A=A'$ since I can choose $A$ arbitrarily large. It is easy to see that $S(n) (\log n)^3 \ge R(n)$ asymptotically, so I would now like to find an upper bound for $S(n)$.
I tried using partial summation in a similar fashion as below :
\begin{align}
\pi(x)&=\sum_{p \le x} 1 ,\\
&=\sum_{p \le x} \frac{\log p}{\log p},\\
&=\frac{1}{\log p} \sum_{p \le x} \log p + \int_2^x \frac{\sum_{p \le t} \log p}{t (\log t)^2} \mathrm{d}t,
\end{align}
which shows equivalence between different formulations of the prime number theorem. I haven't been able to make it work though. I can't manage to figure out the right way to reduce the sum to $1$ variable
 A: Actually there is a quick way, because Parseval's identity gives a bound which is not too bad. Let $m\leq n$ ; starting as in the circle method, but using the triangle inequality, we have
$$ \Bigg|\sum_{\substack{p_1+p_2=2p_3\\p_j \leq n\\p_1 \leq m}} 1\Bigg| = \Bigg|\sum_{\substack{p_j \leq n\\p_1 \leq m}} \int_0^1{\rm e}^{2\pi i\vartheta(p_1 + p_2 - 2p_3)}{\rm d}\vartheta \Bigg| \\ \leq \int_0^1\Bigg|\sum_{p\leq n}{\rm e}^{2\pi i p\vartheta}\Bigg|^2\Bigg|\sum_{p\leq m}{\rm e}^{2\pi i p\vartheta}\Bigg|{\rm d}\vartheta \leq \pi(m)\int_0^1\Bigg|\sum_{p\leq n}{\rm e}^{2\pi i p\vartheta}\Bigg|^2{\rm d}\vartheta = \pi(m)\pi(n) $$
where the sum over $p\leq m$ was bounded trivially, and the integral is evaluated by expanding the square (or applying the Parseval identity). This hold also for the same sum but whith $p_2$ or $p_3$ being small (instead of $p_1$). Then take $m=n/(\log n)^A$ : you get
$$ (1) \qquad T(n) := \sum_{\substack{p_1+p_2=2p_3\\p_j \leq n\\\\min\{p_1, p_2, p_3\} \leq n/(\log n)^A}} 1 = O\Big(\frac{n^2}{(\log n)^{A+1}}\Big). $$
Now 
$$ S(n) = \sum_{\substack{p_1+p_2=2p_3 \\ n/(\log n)^A< p_j\leq n}} 1 + T(n) . $$
Call $S_1(n)$ the first sum in the RHS. For each number $p$ satisfying $n/(\log n)^A<p\leq n$, you have $\log p \geq \log(n/(\log n)^A) = \log n + O(\log\log n)$ (since $A$ is considered fixed). So that :
$$ S_1(n) \leq \frac{1}{(\log n + O(\log\log n))^3} R_1(n) $$
where
$$ R_1(n) := \sum_{\substack{p_1+p_2=2p_3 \\ n/(\log n)^A< p_j\leq n}} (\log p_1)(\log p_2)(\log p_3) .$$
Now that is almost $R(n)$, as you remarked there remains to estimate the error which is
$$ \sum_{\substack{p_1+p_2=2p_3 \\ p_j\leq n \\ \min\{p_1, p_2, p_3\} <n/(\log n)^A}} (\log p_1)(\log p_2)(\log p_3) $$
Just bound trivially the logs by $(\log n)$ and use the bound $(1)$ : the above is $\leq (\log n)^3 T_1(n) \ll n^2/(\log n)^{A-2}$ (we can certainly pick $A$ large enough that this is acceptable).
In short, you have
$$ S(n) = S_1(n) + O\Big(\frac{n^2}{(\log n)^{A+1}}\Big) \leq \frac{R_1(n)}{(\log n + O(\log\log n))^3} + O\Big(\frac{n^2}{(\log n)^{A+1}}\Big), $$
$$ R_1(n) = R(n) + O\Big(\frac{n^2}{(\log n)^{A-2}}\Big), $$
$$ (\log n + O(\log\log n))^3 = (\log n)^3\Big(1 + O\Big(\frac{\log\log n}{\log n}\Big)\Big). $$
Regrouping everything, you have an upper-bound of the shape
$$ S(n) \leq \frac{R(n)}{(\log n)^3} + O\Big(\frac{n^2\log\log n}{(\log n)^4}\Big). $$
As you notice the error term is not very good. I don't see a very quick way to save an arbitrary power of $\log n$, except by studying the more general object
$$ R^*(n_1, n_2, n_3) = \sum_{\substack{p_1 + p_2 = 2p_3\\ p_j \leq n_j}} (\log p_1)(\log p_2)(\log p_3) .$$
Note however that the expected asymptotic formula for $S(n)$ is not that which you wrote, but rather
$$ S(n) = {\mathfrak S}\frac{{\rm Li}(n)^3}{4n} + O\Big(\frac{n^2}{(\log n)^A}\Big) $$
where ${\rm Li}(x)$ is the logarithmic integral
