TITLE: Mean of series is always less than the last element
QUESTION [5 upvotes]: I'm working on an algorithm's efficiency and wanted to know if there was a way to show the following is true. As an example I did this with $n = 10$ and $n=4$ and it was true. I want to know if it is always true but not sure how to go about proving it.
$$n^{n-1} < \frac{\sum_{k=0}^{n} {n^k}}{n} \le n^{n}$$

REPLY [2 votes]: Suppose $(a_k)_{k=1}^n$
is a series with
$a_k \le a_{k+1}$
for $1 \le k \le n-1$.
Let
$A=\frac1{n}\sum_{k=1}^n a_k$
be the mean of the series.
Then
$a_1 \le A \le a_n$
with equality
if and only if
$a_1 = a_n$.
Proof.
Since $a_k \le a_{k+1}$,
then
$a_j \le a_k$
for $j \le k$.
In particular,
for any $1 \le k \le n$,
$a_1 \le a_k \le a_n$.
$\begin{array}\\
a_1-A
&=a_1-\frac1{n}\sum_{k=1}^n a_k\\
&=\frac1{n}\sum_{k=1}^n (a_1-a_k)\\
&\le 0\\
\end{array}\\
$
since $a_1 \le a_k$.
There is equality
if and only if
$a_1 = a_k$
for all $k$.
Similarly,
$\begin{array}\\
a_n-A
&=a_n-\frac1{n}\sum_{k=1}^n a_k\\
&=\frac1{n}\sum_{k=1}^n (a_n-a_k)\\
&\ge 0\\
\end{array}\\
$
since $a_n \ge a_k$.
There is equality
if and only if
$a_n = a_k$
for all $k$.