What is the general formula of $$\lim_{n \to \infty} (1+a_n)^{b_n} \quad \text{where} \quad \lim_{n \to \infty} b_n = \infty?$$
For example we have $$\lim_{n\to \infty} \left(1 + \frac1n\right)^n = e$$
Now I want a general formula for $\lim_{n \to \infty} (1+a_n)^{b_n}$. I know if $a_n \to A \neq 0$ then the answer is infinity. But I am not sure about what will happen when $a_n \to 0$. Maybe the answer is $e^c$ where $c = \lim _{n \to \infty} b_n a_n$. But even if this is the answer, I want the proof.
It seems it must be a famous problem but unfortunately, I couldn't find the answer in math.SE. If an answer exists with proof, please post its link in the comments and I will delete my question.
Let $c_n := a_n b_n$ and assume that $0\lt a_n\rightarrow 0$, $b_n\rightarrow \infty$. Then define: $$ A_n:={\left(1+a_n\right)^{b_n}}=\left({\left(1+a_n\right)^{a_n^{-1}}}\right)^{c_n} $$ From this we can clearly observe that the limit of $A_n$ indeed depends on $c_n$. In particular, if $c_n \rightarrow B$, for some $B$, then $A_n\rightarrow e^{B}$. Otherwise, if $c_n$ is divergent, then so is $A_n$.