<s>[INST] How to find the first four terms of the maclaurin series of $f(x) = e^{e^x}$ I tried substituting the maclaurin series for $e^x$ into the equation, but that doesn’t seem to give the right answer.
I’m not sure what do besides just taking the derivatives.
 [/INST] We know
$$
e^x = 1+x+\frac{x^2}{2}+\frac{x^3}{6}+\dots
$$
so then
$$\begin{align}
\exp(e^x) &= \exp\left(1+x+\frac{x^2}{2}+\frac{x^3}{6}+\dots\right)
\\ &= e^1 e^x e^{x^2/2} e^{x^3/6}\dots
\\
&= e \left(1+x+\frac{x^2}{2}+\frac{x^3}{6}+\dots\right)
\left(1+\frac{x^2}{2}+\frac{x^4}{8}+\dots\right)
\left(1+\frac{x^3}{6}+\dots\right)\cdots
\\ &=
e\left(1+x+x^2+\frac{5}{6} x^3 + \dots\right)
\end{align}$$
</s>