Finding the Laurent series of the following function

I need to find the laurent series and the residue of the following complex function $$f(z)=(z+1)^2e^{3/z^2}$$ at $z=0$.

Since $e^z=\sum z^n/n!$, then $$e^{3/z^2}=\sum_{n=0}^\infty \frac{3^n/n!}{z^{2n}}$$ thus $$f(z)=(z^2+2z+1)\sum_{n=0}^\infty \frac{3^n/n!}{z^{2n}}=\sum_{n=0}^\infty \frac{3^n/n!}{z^{2(n-1)}}+\sum_{n=0}^\infty \frac{2\cdot3^n/n!}{z^{2n-1}}+\sum_{n=0}^\infty \frac{3^n/n!}{z^{2n}}$$ which, with a shift of index and expansion of positive powers, can be expressed as $$f(z)=z^2+3+\sum_{n=1}^\infty\left(\frac{3}{n+1}+1\right)\frac{3^n/n!}{z^{2n}}+\sum_{n=1}^\infty\frac{2\cdot3^n/n!}{z^{2n-1}}$$ so the residue is given by evaluating the numerator of the second series at $n=1$, so its value is $6$. I tried using WolframAlpha and Mathematica to check my answer, but both would not return a value. Would this be correct? Also, is there a way to put the two sums together (one gives the coefficients of even powers, while the other of the odd) so I can have the principal part of the laurent series expressed only with one sum?

Using the coefficient of operator $[z^n]$ to denote the coefficient of $z^n$ of a series, we obtain \begin{align*} \color{blue}{\mathrm{res}_{z=0}f(z)}&=[z^{-1}](z+1)^2e^{3/z^2}\\ &=\left([z^{-3}]+2[z^{-2}]+[z^{-1}]\right)\sum_{j=0}^\infty 3^jz^{-2j}\\ &=0+2\cdot 3^1+0\\ &\,\,\color{blue}{=6} \end{align*} and see the residue of $f$ at $z=0$ is $6$.

Expanding $f$ into a Laurent series at $z=0$ we obtain \begin{align*} \color{blue}{f(z)}&\color{blue}{=(z+1)^2e^{3/z^2}}\\ &=(z^2+2z+1)\sum_{n=0}^\infty \frac{3^n}{n!}\frac{1}{z^{2n}}\\ &=\sum_{n=0}^\infty \frac{3^{n}}{n!}\frac{1}{z^{2n-2}} +2\sum_{n=0}^\infty \frac{3^n}{n!}\frac{1}{z^{2n-1}} +\sum_{n=0}^\infty \frac{3^n}{n!}\frac{1}{z^{2n}}\\ &=\sum_{n=-1}^\infty \frac{3^{n+1}}{(n+1)!}\frac{1}{z^{2n}} +2\sum_{n=-1}^\infty \frac{3^{(n+1)}}{(n+1)!}\frac{1}{z^{2n+1}} +\sum_{n=0}^\infty \frac{3^n}{n!}\frac{1}{z^{2n}}\\ &\color{blue}{=z^2+2z+\sum_{n=0}^\infty\frac{3^n}{n!}\left(\frac{3}{n+1}+1\right)\frac{1}{z^{2n}} +2\sum_{n=0}^\infty \frac{3^{(n+1)}}{(n+1)!}\frac{1}{z^{2n+1}}}\tag{1}\\ &=z^2+2z+\sum_{m=0}^\infty\frac{3^{\frac{m}{2}}}{(\frac{m}{2})!}\left(\frac{3}{\frac{m}{2}+1}+1\right)\frac{1+(-1)^m}{2}\frac{1}{z^{m}}\\ &\qquad+2\sum_{m=0}^\infty \frac{3^{(\frac{m-1}{2}+1)}}{(\frac{m-1}{2}+1)!}\cdot\frac{1-(-1)^m}{2}\frac{1}{z^{m}}\\ &=z^2+2z+\sum_{m=0}^\infty\left(\frac{3^{\frac{m}{2}}}{2(\frac{m}{2})!}\left(\frac{m+8}{m+2}\right)\left(1+(-1)^m\right)\right.\\ &\qquad\qquad\qquad\qquad\quad\left.+ \frac{3^{\frac{m+1}{2}}}{\left(\frac{m+1}{2}\right)!}\left(1-(-1)^m\right)\right)\frac{1}{z^{m}}\tag{2} \end{align*}

We observe that putting all terms together as in (2) is rather cumbersome and the representation in (1) seems to be more convenient. It clearly shows the terms for odd and even powers and we can also easily derive from (1) the residue by inspecting the right-most sum in (1) with $n=0$.

Since the $Res_\infty+Res_0=0$, you may want to calculate the residue at infinity, but I don’t think it is easier.

$$Res_\infty=-Res_0\frac1{z^2}(\frac1{z^2}+\frac2z+1)e^{3z^2}$$

Collecting the $z^{-1}$ terms, $$=-Res_0\frac{1}{z^2}\cdot\frac2z\cdot\frac{3^1}{1!}z^2=-Res_06z^{-1}=-6$$

Therefore, $Res_0=6$.

For the series, if the function $a(2n)$ generates coefficients for $x^{2n}$ and $b(2n+1)$ for $x^{2n+1}$, then in general the ‘coefficient function’ $c(n)$ for $x^n$ is $$c(n)=\frac{1+(-1)^{n}}2\cdot(a(n)-b(n))+b(n)$$