While playing around with statistical moments, I came around the following sum
$$
\frac 1 n\sum_{i=1}^n i^2
$$
which motivated
$$
f(n)=\frac 1 n\sum_{i=1}^n~ i^{1/n}
$$
To my surprise, it seems to peak at some point (we are interested in finding that point):
and holds when I make the steps smaller and smaller:
I intuited that in the continuous limit,
$$
\begin{align}
f(n)&=\frac{1}{n-1}\int_{1}^{n}x^{1/n}dx\\
&=\frac{n(n^{1+1/n}-1)}{n^2-1}
\end{align}
$$
which is ugly but holds:
and has a hopeless derivaitve that roots at $3.12831\ldots$, which seems about right. Is there a way to have found out the maxima (numerical or analytic value) without having to convert to the integral first?



As @Aaron Hendrickson already commented, using generalized harmonic numbers $$f(n)=\frac 1 n H_n^{\left(-\frac{1}{n}\right)}$$ and the maximum is reached for $n=3$ for which $f(3)=\frac{1}{3} \left(1+\sqrt[3]{2}+\sqrt[3]{3}\right)\sim 1.23406$. This is very easily obtained using integer optimization.