# $\sum_{k=1}^n \Bigl(\frac{a_1+\dots+a_k}k\Bigr)^p\le\frac{p}{p-1}\sum_{k=1}^n\Bigl(\frac{a_1+\dots+a_k}k\Bigr)^{p-1}a_k$ for nonnegative $(a_k)$

I am struggling with the following task:

Let$$1 Prove that $$\sum_{k=1}^n \Bigl(\frac{a_1+\dots+a_k}{k}\Bigr)^p \le \frac{p}{p-1}\Biggl(\sum_{k=1}^n \Bigl(\frac{a_1+\dots+a_k}{k}\Bigr)^{p-1}a_k\Biggr)$$ and $$\Biggl(\sum_{k=1}^n \Bigl(\frac{a_1+\dots+a_k}{k}\Bigr)^p\Biggr)^{1/p} \le \frac{p}{p-1} \Biggl(\sum_{k=1}^n a_k^p \Biggr)^{1/p}.$$

My attempt: Let $$f(z)=z^p$$, then \begin{align*} \sum_{k=1}^n \Bigl(\frac{a_1+\dots+a_k}{k}\Bigr)^p &=\sum_{k=1}^n f\Bigl(\frac{a_1+\dots+a_k}{k}\Bigr)\\ &=\sum_{k=1}^n \int_0^{\frac{a_1+\dots+a_k}{k}} f'(t)dt\\ &=\sum_{k=1}^n \Bigl(\int_0^{\frac{a_1}{k}} f'(t)dt+\dots+\int_{\frac{a_1+\dots+a_{k-1}}{k}}^{\frac{a_1+\dots+a_k}{k}} f'(t)dt \Bigr)\\ &\le \sum_{k=1}^n \Biggl(\frac{a_1}k f'\Bigl(\frac{a_1}k\Bigr)+\frac{a_2}kf'\Bigl(\frac{a_1+a_2}k\Bigr)+\dots+\frac{a_k}kf'\Bigl(\frac{a_1+\dots+a_k}k\Bigr)\Biggr)\\ &=\sum_{k=1}^n \frac pk\Biggl(a_1\Bigl(\frac{a_1}k\Bigr)^{p-1}+a_2\Bigl(\frac{a_1+a_2}k\Bigr)^{p-1}+\dots+a_k\Bigl(\frac{a_1+\dots+a_k}k\Bigr)^{p-1}\Biggr)\\ &=\sum_{k=1}^n \frac pk\Biggl(\sum_{j=1}^k a_j \Bigl(\frac{a_1+\dots+a_j}{k}\Bigr)^{p-1}\Biggr), \end{align*}

but I'm not sure how to proceed. Could anyone help, please? Thanks

Let $$S_k = (a_1 + \dots + a_k )/k$$ for each valid $$k$$, and define $$S_0 = 0$$. We shall prove that $$\left( 1 + \frac{k}{p-1}\right) S_k^p \leq \frac{p}{p-1} S_k^{p-1} a_k + \frac{k-1}{p-1} S_{k-1}^p$$ for all $$1\leq k\leq n$$. If this is true, summing the inequalities for $$k = 1,2,\dots,n$$, you will get the desired result.
To prove the inequality above, substitute $$a_k = kS_k - (k-1)S_{k-1}$$, then it reduces to $$p S_k^{p-1} (S_{k-1}-S_k) \leq S_{k-1}^p - S_k^p$$ This can be easily proved by dividing the cases by whether $$S_k\geq S_{k-1}$$ or not.