How to evaluate the following?
$$\lim_{n\to\infty}\frac{3}{n}\sum_{i=1}^n\left(\left(\frac{3i}{n}\right)^2-\left(\frac{3i}{n}\right)\right)$$
I simply expanded but I did not find the answer. I think there might be some trick or clever observation, but now I'm not seeing it.
It is a Riemann sum, so we have $$\lim_{n\rightarrow\infty}\frac{3}{n}\sum_{k=1}^{n}\left(\left(\frac{3k}{n}\right)^{2}-\frac{3k}{n}\right)=3\int_{0}^{1}(9x^{2}-3x)\,dx=\color{red}{\frac{9}{2}}.$$