I was trying to get the probability distribution $p(n)$ from a generating function $G(s)$ like this: 


$G(s) = e^{a(s-1)^2}=\sum s^np(n)$


I need first to do Maclaurin expansion of the exponential and then get the $n$th order term for $p(n)$.


My first thinking was it would be simple to calculate the derivatives. But it turns out to be much more difficult and also very interesting to generalize the $n$ order derivative. 


I list a table for the powers and coefficients of each derivative order, finding that the powers are odd numbers for odd $n$, even numbers for even $n$, the coefficients are associated to $(n-1)$th order's powers and coefficients. It is easy to see the association but I cannot generalize it. 


Anyone could give a shot and help me out?


UPDATE: to give some feedbacks to the question for other users


Actually the generating function I gave above cannot generate a proper probability sequence since negative values will show up. One way of modifying it is to add one more term in the power:


\begin{equation}
e^{a(s-1)^2+b(s-1)}=\sum s^np(n)
\end{equation}


with constraint $b>2a$ guaranteeing the positiveness of sequence elements. Using hermite polynomials and changing of variables, one can obtain


\begin{equation}
\nonumber p(n)=e^{a-b}\frac{\alpha^n}{n!}H\_n(\frac{b+2\alpha^2}{2\alpha})
\end{equation}



An interesting calculation of derivative
**Robert Israel** noted that $p(n)$ is a $e^a$ times a polynomial of degree $n$
in $a$ with a zero of order $\lceil n/2 \rceil$ at $a=0$.
We express this polynomial in terms of a
[Hermite
polynomial](http://en.wikipedia.org/wiki/Hermite_polynomials#Generating_function) $H\_n$ evaluated at an imaginary argument $\alpha := \pm \sqrt{-a}$.


Start from the generating function
$$
\exp(2xt-t^2) = \sum\_{n=0}^\infty H\_n(x) \frac{t^n}{n!},
$$
and set $(x,t) = (\alpha, \alpha s)$. Then
$$
2xt-t^2 = \alpha^2 (2s-s^2) = a (s^2-2s) = a(s-1)^2 - a,
$$
whence
$$
e^{a(s-1)^2} = e^a e^{a(s^2-2s)} 
= e^a \sum\_{n=0}^\infty H\_n(\alpha) \frac{(\alpha s)^n}{n!},
$$
and $p(n) = \alpha^n H\_n(\alpha) / n!$. Known formulas and identities
for the Hermite polynomials can then be used to study the sequence $\{ p\_n \}$.


