I cannot understand this result from pages 17–18 of Tenenbaum and Mendes's The Prime Numbers and Their Distribution on how the summation of $\frac{x\log(2)}{2^j}+O(\log(x))$ results in $2x \log(2) + O(\log(x)^2).$ What are the steps in the summation that give the result? Did they use a telescoping series?
It is given that $B_2(x)=\log[2x]! - 2\log[x]! = B(x)-2B(x/2)$, and from the text,
The lower estimate for $B_2 (x)$ is used inductively: we have \begin{align} \psi(x) & \le B_2(x) + \psi(x/2) \le B_2(x) + B_2(x/2) + \psi(x/4) \\ & \le \cdots \le \sum_{0 \le j \le k} B_2(x/2^j) + \psi(x/2^{k+1}). \end{align} Here, $k$ is an arbitrary integer. Let us choose $$k = K(x) := [(\log x)/ \log 2],$$ so that $\psi(x/2^{k+1}) = 0$. It follows that \begin{align} \psi(x) & \le \sum_{0 \le j \le K(x)} \left\lbrace \frac{x \log 2}{2^j} + O(\log x)\right\rbrace \\ & \le 2x \log 2 + O((\log x)^2). \end{align}
$$\sum_j\left({x\log2\over2^j}+O(\log x)\right)=x\log2\sum_j(1/2^j)+\sum_jO(\log x)\le2x\log2+O(K(x)(\log x))$$
$$=2x\log2+O((\log x)^2)$$