(The inequality is valid $a_1,\dots,a_k\in\mathbb{R}^+,n_1,\dots,n_k\in\mathbb{N}$). How can I possibly prove this? The textbook I'm using as source material only proves a corollary of the AM-GM inequality, i.e.,
$$\frac{x}{p} + \frac{y}{q} \geq x^{1/p}y^{1/q} \tag{1}$$
for $x,y>0, 1/p + 1/q = 1$.
I'm trying to use induction on the subindex $k$. Will it work using induction on just even $k$'s (and then using backward induction)?
We know that the inequality is true for $k=2$. Let's suppose without loss of generality that $n_1\geq n_2$:
$$\frac{n_1a_1 + n_2a_2}{n_1+n_2}=\bigg(\frac{n_1}{n_1+n_2}\bigg)a_1 + \bigg(\frac{n_2}{n_1+n_2}\bigg)a_2\stackrel{r:={\frac{n_1}{n_1+n_2}}}{=}ra_1 (1-r)a_2\geq (a_1^r a_2^{1-r}) \tag{2}$$
But notice that $r+(1-r)=1$. So our inequality is a special case of $(1)$.
How can I finish this induction? I've tried many strategies (combining pairs of $a_i$'s and $n_i$'s, etc.) but I always end up with ghastly sums in the denominator on the left and on the exponent on the right.
Consider
$a_1$ values with frequency $n_1$
$a_2$ values with frequency $n_2$
. . .
$a_k$ values with frequency $n_k$
AM = $\frac{\displaystyle \sum_{i=1}^k n_i a_i}{\displaystyle \sum_{i=1}^k n_i}$
GM = $\left[\displaystyle \prod_{i=1}^k a_i^{n_i}\right]^{\displaystyle\frac{1}{\displaystyle \sum_{i=1}^k n_i}}$
and AM $\geq$ GM completes the proof.