<s>[INST] Prove that $\lim\limits_{n\rightarrow\infty} \left(1+\frac{1}{a_{n}} \right)^{a_{n}}=e$ if $\lim\limits_{n\rightarrow\infty} a_{n}=\infty$ What would be the nicest proof of the following theorem:

If $\lim\limits_{n \rightarrow \infty} a_{n} = \infty$, then $\lim\limits_{n \rightarrow \infty} \left(1 + \frac{1}{a_{n}} \right) ^ {a_{n} } = e$.
If $\lim\limits_{n \rightarrow \infty}b_{n} = 0$, then $\lim\limits_{n \rightarrow \infty} \left(1 + b_{n} \right) ^ {\frac {1} {b_{n}} } = e$.

I somehow failed to find a proof here on the website and in the literature.
 [/INST] For any $a_n$ exists $x\in \mathbb N$ such that $x\le a_n\le x+1$ and
$$\left(1 + \frac{1}{x +1} \right)^{x} \leq \left(1 + \frac{1}{a_n} \right)^{a_n} \leq \left(1 + \frac{1}{x} \right)^{x+1}$$
and
$$\left(1 + \frac{1}{x +1} \right)^{x} =\frac{\left(1 + \frac{1}{x +1} \right)^{x+1}}{1 + \frac{1}{x +1} } \to \frac e 1=e$$
$$\left(1 + \frac{1}{x} \right)^{x+1}=\left(1 + \frac{1}{x} \right)^{x}\left(1 + \frac{1}{x} \right)\to e \cdot 1=e$$
then we can conclude by squeeze theorem.
</s>