I want to argue that $$\lim_{n\rightarrow\infty} \frac{1}{n}\sum_{k=1}^n f(k)=0~~~~~~~ {\rm if}~~~~~ \lim_{k\rightarrow\infty}f(k)=0.$$
This identity does not seem to hold always, but seems to hold in practice based on my experience. I guess there should be some conditions to make this identity hold.
For example, I think $f(k)$ may have to converge to zero uniformly, not pointwise. Or $f(k)$ may have to be an uniformly continuous function of $k$.
Can anyone help me set up the conditions and prove the identity?
Fix $\epsilon>0$. Since $f(k)\to0$, there must be a uniform bound $A$ so that $|f(k)|\leq A$ for all $k$. There's also an $N=N(\epsilon)$ so that for $k>N$, $|f(k)|\leq\epsilon$. Thus \begin{align*}\left|\frac{1}{n}\sum_{k=1}^nf(k)\right|\leq\frac{1}{n}\sum_{k=1}^n|f(k)|\leq\frac{1}{n}\sum_{k=1}^N|f(k)|+\frac{1}{n}\sum_{k=N+1}^n|f(k)|\\\leq\frac{1}{n}NA+\frac{1}{n}(n-N)\epsilon=\epsilon+\frac{N(\epsilon)}{n}(A-\epsilon).\end{align*} First take $n\to\infty$ to find $$\lim_{n\to\infty}\left|\frac{1}{n}\sum_{k=1}^nf(k)\right|\leq\epsilon$$ and then take $\epsilon\to0$ to conclude.