Calculating the Limit $\lim_{p\to 0}\left(\frac1n\sum_{i=1}^na_i^p\right)^{1/p}$ Apologies, it has been many years since I took a math course so I am forgetting many things including terminology, but I have a question about the following:
$$ M_p = \left(\frac{1}{n}  \sum_{i=1}^n a_i^p \right) ^ \frac{1}{p}$$
Where, I am under the impression that 
$$ \lim_{p\to 0} M_p $$
is
$$ M_0= (a_1...a_n) ^ \frac{1}{n}$$ 
the geometric mean.
I am wondering if somebody could help me to recall how I would solve the limit?  Step by step is appreciated.
 A: Let $M_p=\left(\frac1n\sum_{i=1}^n(a_i)^p\right)^{1/p}$, where we assume that $a_i> 0$ for all $i$.  Then, we can write
$$\log(M_p)=\frac1p\log\left(\frac1n\sum_{i=1}^n(a_i)^p\right) \tag1$$
Taking the limit of $(1)$ as $p\to 0$ and exploiting L'Hospital's Rule yields
$$\begin{align}
\lim_{p\to 0}\log(M_p)&=\lim_{p\to 0}\frac1p\log\left(\frac1n\sum_{i=1}^n(a_i)^p\right)\\\\
&=\lim_{p\to 0}\frac{\frac1n\sum_{i=1}^n(a_i)^p\log(a_i)}{\frac1n\sum_{i=1}^n(a_i)^p}\\\\
&=\frac1n\sum_{i=1}^n\log(a_i)\\\\
&=\log\left(\prod_{i=1}^na_i^{1/n}\right)\tag 1
\end{align}$$
whereupon we find 
$$\lim_{p\to 0}M_p=e^{\log\left(\prod_{i=1}^na_i^{1/n}\right)}=\prod_{i=1}^na_i^{1/n}$$
as was to be shown!
A: $$ \lim_{p\to 0} M_p(a)=\lim_{p\rightarrow0}\left(1+\sum_{i=1}^n\frac{a_i^p-1}{n}\right)^{\frac{1}{p}}= \lim_{p\rightarrow0}\left(1+\sum_{i=1}^n\frac{a_i^p-1}{n}\right)^{\frac{1}{\sum\limits_{i=1}^n\frac{a_i^p-1}{n}}\cdot\sum\limits_{i=1}^n\frac{a_i^p-1}{np}}=$$
$$=e^{\frac{1}{n}\lim\limits_{p\rightarrow0}\sum\limits_{i=1}^n\frac{a_i^p-1}{p}}=e^{\frac{1}{n}\sum\limits_{i=1}^n\ln{a_i}}=(a_1...a_n) ^ \frac{1}{n}.$$
