Selberg's identity

In number theory, Selberg's identity is an approximate identity involving logarithms of primes named after Atle Selberg. The identity, discovered jointly by Selberg and Paul Erdős, was used in the first elementary proof for the prime number theorem.

Statement
There are several different but equivalent forms of Selberg's identity. One form is
 * $$\sum_{p<x}(\log p)^2 +\sum_{pq<x}\log p \log q = 2x\log x +O(x)$$

where the sums are over primes p and q.

Explanation
The strange-looking expression on the left side of Selberg's identity is (up to smaller terms) the sum
 * $$\sum_{n<x} c_n$$

where the numbers
 * $$c_n = \Lambda(n)\log n +\sum_{d\,|\,n}\Lambda(d)\Lambda(n/d)$$

are the coefficients of the Dirichlet series
 * $$\frac{\zeta^{\prime \prime}(s)}{\zeta(s)}=\left(\frac{\zeta^{\prime }(s)}{\zeta(s)}\right)^\prime +\left(\frac{\zeta^{\prime }(s)}{\zeta(s)}\right)^2=\sum \frac{c_n}{n^s}.$$

This function has a pole of order 2 at s =&thinsp;1 with coefficient 2, which gives the dominant term 2x&thinsp;log(x) in the asymptotic expansion of $$\sum_{n<x} c_n.$$

Another variation of the identity
Selberg's identity sometimes also refers to the following divisor sum identity involving the von Mangoldt function and the Möbius function when $$n \geq 1$$:


 * $$\Lambda(n) \log(n) + \sum_{d\,|\,n} \Lambda(d) \Lambda\!\left(\frac{n}{d}\right) = \sum_{d\,|\,n} \mu(d) \log^2\left(\frac{n}{d}\right). $$

This variant of Selberg's identity is proved using the concept of taking derivatives of arithmetic functions defined by $$f^{\prime}(n) = f(n) \cdot \log(n)$$ in Section 2.18 of Apostol's book (see also this link).