Let $(a_n)_{n=1}^\infty$ be an infinite sequence of complex numbers. Prove the following limit. Given $$\lim_{x\to \infty} \frac 1x \sum_{n\le x} a_n = k,$$
I want to prove that 
$$\lim_{x\to \infty} \frac {1}{\log x} \sum_{n\le x} \frac {a_n}{n} = k.$$
I'm much more interested in learning the technique(s) necessary in order to prove this rather than a direct proof. Specifically, we have learned about asymptotic estimates and summation by parts, but I don't see how I can use those techniques to prove the problem statement. Thank you for any insight!
 A: I would say summation by parts is a useful general technique here.  This would be very straightforward if $x$ is an integer.
In general, let $m = \lfloor x \rfloor$ and $S_m = \sum_{n=1}^m a_n$. Summing by parts we have
$$\tag{*}\sum_{n\leqslant x} \frac{a_n}{n} =\sum_{n=1}^m \frac{a_n}{n} = \frac{S_m}{m} + \sum_{n=1}^{m-1} S_n \left( \frac{1}{n} - \frac{1}{n+1}\right)= \frac{S_m}{m} + \sum_{n=1}^{m-1} \frac{S_n}{n(n+1)} $$
Dividing by $\log x$ and taking the limit as $x \to \infty$ we get the desired result.
Note that $\lim_{x \to \infty} m/x = 1$ since $x- 1 < m \leqslant x$, and 
$$\lim_{m \to \infty} \frac{S_m}{m} = \lim_{x \to \infty} \frac{x}{m}\lim_{x \to \infty} \frac{1}{x}\sum_{n \leqslant x} a_n = k \\ \implies \lim_{x \to \infty} \frac{S_m}{m\log x} = 0$$
Applying the  Stolz-Cesaro theorem, we can handle the limit of the second term on the RHS of (*).
$$\begin{align}\lim_{x \to \infty} \frac{1}{\log x}\sum_{n=1}^{m-1} \frac{S_n}{n(n+1)} &=  \lim_{x \to \infty} \frac{\log m}{\log x} \lim_{m \to \infty}\frac{1}{\log m}\sum_{n=1}^{m-1} \frac{S_n}{n(n+1)}\\ &=   \lim_{m \to \infty} \frac{ \sum_{n=1}^{m} \frac{S_n}{n(n+1)} -\sum_{n=1}^{m-1} \frac{S_n}{n(n+1)} }{\log(m+1) - \log m}\\ &= \lim_{m \to \infty} \frac{S_m/m}{(m+1)\log(1 +1/m)} \\ &= \frac{k}{\log e} = k\end{align}$$
A: Let $A(x)$ be defined as
$$
A(x)=\sum_{n\le x}a_n=kx+o(x)
$$
then we have
$$
\begin{aligned}
\sum_{n\le x}{a_n\over n}
&=\int_{1^-}^x{\mathrm dA(t)\over t} \\
&=\int_1^x{\mathrm d(kt)\over t}+\int_1^x{\mathrm d[o(t)]\over t} \\
&\sim k\log x
\end{aligned}
$$
