Generating function of non-regular language
If we apply a substitution that maps all letters of the alphabet to the same letter, we obtain a unary language. This shows that if $L$ is regular, then the set $\{n : L \cap \Sigma^n \neq \emptyset\}$ is eventually periodic. This shows that $\sum_{n=0}^\infty x^{n^2}$ corresponds to no regular language, for example.