Proof of the AM-GM inequality I found here
As $(\sqrt{x_1}-\sqrt{x_2})^2 \geq 0$ we have $$\sqrt{x_1 \cdot x_2} \leq \frac{x_1+x_2}{2}.$$ Applying this inequality twice, we get $$(x_1 x_2 x_3 x_4)^{\frac{1}{4}} \leq \frac{\sqrt{x_1 x_2}+\sqrt{x_3 x_4}}{2} \leq \frac{x_1+x_2+x_3+x_4}{4}.$$ By induction, it is not difficult to see that $$(x_1 \cdots x_{2^k})^{\frac{1}{2^k}} \leq \frac{x_1+\ldots+x_{2^k}}{2^k} \tag{1}$$ for all $k \geq 1$.
It remains to fill the gaps between the powers of two. So let $x_1,\ldots,x_n$ be arbitrary positive numbers and choose $k$ such that $n\leq 2^k$. We set
$$\alpha_i := \begin{cases} x_i & i \leq n \\ A & n< i \leq 2^k \end{cases}$$
where $A:= \frac{x_1+\ldots+x_n}{n}$. Applying $(1)$ to the $(\alpha_1,\ldots,\alpha_{2^k})$ yields
$$\bigg( x_1 \ldots x_n A^{2^k-n} \bigg)^{\frac{1}{2^k}} \leq \frac{x_1+\ldots+x_n+(2^k-n) A}{2^k} = A.$$
Hence,
$$(x_1 \ldots x_n)^{1/n} \leq A = \frac{x_1+\ldots+x_n}{n}.$$
I understand everything except the very last step:
Hence,
$$(x_1 \ldots x_n)^{1/n} \leq A = \frac{x_1+\ldots+x_n}{n}.$$
How did he reach the conclusion? The only thing he proved is that
$$\bigg( x_1 \ldots x_n A^{2^k-n} \bigg)^{\frac{1}{2^k}} \leq A$$
But I don't see how this allows him to reach the final conclusion.