When a function contains a sequence, and how to find the function's limit? Suppose $\lim \limits_{n \to \infty} a_n = 0$. Find the limit
$$\lim \limits_{n \to \infty} \left(1+a_n \frac{x}{n}\right)^n$$
It's kind intuitive that the answer is 1, but clearly I can't just say that the limits equal $\lim \limits_{n \to \infty} 1^n = 1$.
I feel like I should let $y =(1+a_n \frac{x}{n})^n $. Then take $log$ so that $log(y) = nlog(1+a_n \frac{x}{n})$ But L'hopital doesn't apply here either

Hint: Supose $\lim_{n\to \infty}n\cdot\frac{1}{ x\cdot a_n}=0$. Note that $\lim_{n\to \infty} x\cdot a_n=0$,
$$
                 \left( 
                       1+a_n\frac{x}{n}
                 \right)^{n}
=
      \left( 
             1+\frac{1}{n\cdot\frac{1}{ x\cdot a_n}}
      \right)^n
=
         \left[
                 \left( 
                       1+\frac{1}{n\cdot\frac{1}{ x\cdot a_n}}
                 \right)^{n\cdot\frac{1}{\color{red}{ x\cdot a_n}}}
         \right]^{\color{red}{ x\cdot a_n}}
$$
and $
\lim_{n\to \infty}
                 \left( 
                       1+\frac{1}{\color{blue}{n\cdot\frac{1}{ x\cdot a_n}}}
                 \right)^{\color{blue}{n\cdot\frac{1}{ x\cdot a_n}}}=e
$. 
If $\lim_{n\to \infty}n\cdot\frac{1}{ x\cdot a_n}=0$ then
$$
\lim_{n\to \infty}
                  \left[
                 \left( 
                       1+\frac{1}{n\cdot\frac{1}{ x\cdot a_n}}
                 \right)^{n\cdot\frac{1}{\color{red}{ x\cdot a_n}}}
         \right]^{\color{red}{ x\cdot a_n}}
=\ldots =e^0=1
$$
The case $\lim_{n\to \infty}n\cdot\frac{1}{ x\cdot a_n}=L\in\mathbb{R}$ is trivial.
