Expand the two Dirichlet polynomials, keeping the complex conjugate on . The diagonal contributes exactly . If , the exponential integral is
whose absolute value is at most . Thus the mean-value formula is
This also covers .
For , integration of over gives ; the analogous inequality holds with exchanged. Hence . This gives the requested first bound .
For the weighted bound, put and . The inequality
reduces the estimate to a row sum and its symmetric counterpart. For a fixed , the preceding logarithm bounds give
Here , and each resulting harmonic sum is . The symmetric row sum is bounded by . Therefore the second error bound is
Expand the finite Euler product into geometric series. By unique prime factorization, it is the sum of over positive integers whose prime factors do not exceed , and hence contains every term up to . The harmonic sum satisfies
The last inequality uses , including when is an integer. For each prime number ,
The telescoping series over all integers bounds the sum of these remainders by . Taking logarithms of the product bound therefore gives
This explicit constant suffices; no asymptotic theorem about the distribution of prime numbers is needed.
Write
uniformly for . The accumulated error from to tends to zero, while the corresponding harmonic sum tends to . Hence .