[An Introduction to Sieve Methods and Their Applications- M Ram Murty, pg.14, Q35,36]
Let $\max(n)$ denote the largest exponent appearing in the unique factorization of $n$ into distinct prime powers. Show that $$\sum_{n\le x}\max(n)=O(x)$$ Now, show that for some constant $c>0$, we have $$\lim_{x\to \infty}\sum_{n\le x}\max(n)\sim cx$$ What can be said about the error term? What can be said about the constant $c$?
For the first one, I tried using Abel summation on the function $\max(n)$, but couldn't make much progress. The second one, I feel, should follow quite easily from the first, but I can't see how.
Miracles often happen when we turn this expression into a multiple sum. Let $p,q$ denote primes. Then we have
\begin{aligned} \sum_{n\le x}\max(n) &=\sum_{t\le\log_2x}\sum_{\substack{n\le x\\\max(n)=t}}t=\sum_{t\le\log_2x}\sum_{p\le x}\sum_{\substack{n\le x\\p^t\|n\\(q|n\wedge q\ne p)\Rightarrow q^t\nmid n}}t \\ &=\sum_{t\le\log_2x}\sum_{p\le x}\sum_{\substack{m\le x/p^t\\p\nmid m\\q|m\Rightarrow q^t\nmid m}}t\le\sum_{p\le x}1+\sum_{t\ge2}\sum_{p\le x}{xt\over p^t} \\ &\ll x+x\sum_{p\le x}{p^{-2}\over1-p^{-1}}\le x+x\sum_{n\ge2}{1\over n(n-1)}=2x. \end{aligned}