In analytic number theory, for example as in ternary Goldbach problem via circle method, when one has to deal with exponential sums over primes often people use von Mangoldt function or log weight. In other words, instead of 
$$
\sum\_{p < X}e^{2 \pi i f(p)}
$$
one considers 
$$
\sum\_{n < X} \Lambda(n) e^{2 \pi i f(n)}
$$
or
$$
\sum\_{n < X} \log (n) 1\_{\mathbb{P}}(n) e^{2 \pi i f(n)}
$$
where $1\_{\mathbb{P}}$ is the characteristic function on the primes and $f$ is a polynomial with integer coefficients.


Is the reason for introducing these log weights only so that certain computation becomes less messy? or are there cases where introducing such weights was actually crucial? [are there even some philosophy behind this maneuver?]


Thank you very much!



Reason for putting log weight for exponential sums over primes?
Ultimately, it is because of the fundamental theorem of arithmetic, which expresses each natural number $n$ as a product of the primes dividing it:
$$ n = p\_1^{a\_1} \dots p\_k^{a\_k}.$$
Taking logarithms to make this multiplicative formula additive, we conclude that
$$ \log n = \sum\_{p,j: p^j|n} \log p $$
or in terms of the von Mangoldt function
$$ \log n = \sum\_{d|n} \Lambda(d).$$
This formula is the starting point for many computations involving primes, and so we see that the logarithmic weighting enters in at the very beginning.


