Let $\Lambda$ be the von Mangoldt function. I am interested in understanding the average $$\sum_{n=1}^x \Lambda(n)^2.$$ By partial summation and the prime number theorem one can prove that this is $$ x(\log x) -x +O\left(\frac{x}{(\log x)^A}\right)$$ for any fixed $A>0$. But my question is whether one can see this directly from the residue of some Perron style formula? Presumably the Dirichlet series of $\Lambda^2$ has a double pole at $s=1$ but I am not aware of any nice Dirichlet series for $\Lambda^2$.
Replacing $\Lambda^2(n)$ by $(\log n) \Lambda(n)$ would change almost nothing in any asymptotics and $(\log n) \Lambda(n)$ is nicer to work with as it comes up naturally as the derivative of $\zeta'/\zeta$. The equality
$$\left(\frac{\zeta'}{\zeta}\right)'=
\frac{\zeta"}{\zeta} -\left(\frac{\zeta'}{\zeta}\right)^2
= \frac{\zeta"}{\zeta'} \frac{\zeta'}{\zeta} -\left(\frac{\zeta'}{\zeta}\right)^2
$$
is equivalent to $$ -\Lambda \cdot \log =f\ast \Lambda - \Lambda \ast \Lambda ,$$
where $\cdot$ is pointwise multiplication, $\ast$ is the Dirichlet convolution and $f$ is the coefficient of $-\zeta"/\zeta'$. But $f$ looks a bit mysterious!