Solution (source code)

= Solution

Put $t=s-1$. The <Laurent series> of the <logarithmic derivative> at the simple pole of $\zeta$ has the form
$$
\frac{\zeta'(s)}{\zeta(s)}=-\frac1t+c_0+O(t),
$$
where in fact $c_0=\gamma$. Hence
$$
\left(\frac{\zeta'}\zeta(s)\right)^2
=\frac1{t^2}-\frac{2c_0}{t}+O(1),
\qquad
\frac{x^s}{s}
=x\bigl(1+t(\log x-1)+O(t^2)\bigr).
$$
The coefficient of $t^{-1}$ in their product, and therefore the <residue>, is
$$
x(\log x-1-2c_0)=x\log x+Ax,
$$
with the constant $A=-1-2c_0$; equivalently, $A=-1-2\gamma$.