Let $g(s)=\sum_{n=0}^{\infty} a_n s^n$ be a generating function. $i$ is said to be an extremum of $a_n$, if $a_{i-1} < a_i > a_{i+1}$ or $a_{i-1} > a_i < a_{i+1}$.
Is there a general method to determine the number of extrema of $a_n$ based on $g(s)$?
More concretely, I am trying to find the number of extrema of the sequence defined by $g(s)=e^{\lambda_1 s+ \lambda_2 s^2 + \lambda_3 s^3}$, where $\lambda_{1,2,3}\in \mathbb{R}^+$. There are more examples where I need to apply this method.
My first attempt was to interpret $a_n = \frac{1}{2\pi i} \oint_C g(s) s^{-n-1} ds$ as a continuous function in $n$ and then derive for $n$. However, the function $a(n)$ seems to have more extrema than $a_n$ in some cases, so this idea does not work out.
Thanks!