How to prove $ \sum_{n=1}^{\infty}\left|\frac{a_{1}+\cdots+a_{n}}{n}\right|^{p}\leq\left(\frac{p}{p-1}\right)^{p}\sum_{n=1}^{\infty}|a_{n}|^{p} $ Let define $(a_n)_{n\geq1}$ as real series. Prove, that 
$$
\sum_{n=1}^{\infty}\left|\frac{a_{1}+\cdots+a_{n}}{n}\right|^{p}\leq\left(\frac{p}{p-1}\right)^{p}\sum_{n=1}^{\infty}|a_{n}|^{p}
$$
(*) Extended level question - is the constant $\left(\frac{p}{p-1}\right)^p$
  optimal?
I've tried induction methods, getting the logarithm of each sides, but it seems to be not working...
 A: The following argument can be found in Problems in Real Analysis: Advanced Calculus on the Real Axis.
Due to Mond and Pecaric:
$$
\left[ \frac{1}{n} \sum_{k=1}^n \left( \frac{a_1+\cdots+a_k}{k} \right)^p   \right]^{1/p}
\leq \frac{1}{n} \sum_{k=1}^n \left( \frac{1}{k} \sum_{i=1}^k a_i^p\right)^p,
$$
with equality if and only if $a_1= \cdots a_n$. The above inequality can be written, equivalently
$$ \tag 1
\sum_{k=1}^n \left( \frac{a_1+\cdots+a_k}{k} \right)^p  \leq 
n^{1-p} \left[ \sum_{k=1}^n \left( \frac{1}{k} \sum_{i=1}^k a_i^p\right)^{1/p} \right]^p.
$$
One may also prove the inequality:
$$ \tag 2
\sum_{k=1}^n \left( \frac{1}{k} \right)^{1/p} < \frac{p}{p-1} n^{1-1/p},
$$
for all integers $n\geq 1$ and any real number $p>1$.
Set $S_n := \sum_{j=1}^n a_j^p$. Thus, by $(1)$ and  $(2)$ and the observation that $S_n\geq \sum_{j=1}^k a_j^p$ for all $1\leq k \leq n$, we obtain 
\begin{align}
\sum_{k=1}^n \left( \frac{a_1+\cdots+a_k}{k} \right)^p  &\leq 
n^{1-p} S_n \left[ \sum_{k=1}^n \left( \frac{1}{k} \right)^{1/p} \right]^p \\
&\leq n^{1-p} S_n \frac{p^p}{(p-1)^p} n^{p-1} \\ &= \frac{p^p}{(1-p)^p} \sum_{k=1}^n a_k^p.
\end{align}
Let $n \to \infty $ in the above inequality to get the result.
In order to show that $p^p (p-1)^{-p}$ is the best constant take the sequence $a_n= n^{-1/p}$ if $n\leq N$ and $0$ elsewhere where $N$ is a fixed positive integer. A straightforward computation shows that for every $\epsilon \in (0,1) $ there exists a positive integere $N(\epsilon)$ such that
$$
\sum_{n=1}^\infty \left( \frac{1}{n} \sum_{k=1}^{n} a_k \right)^p > (1-\epsilon) 
\frac{p^p}{(1-p)^p} \sum_{n=1}^\infty a_k^p,
$$  
for the above choice of $(a_n)_{n\geq 1}$ and for all $N \geq N(\epsilon)$. This justifies that $p^p (p-1)^{-p}$ cannot be replaced with a smaller one.
