Defining composition of two formal series - what is going on? I'm trying to self-study generating functions and here's a fragment from "generatingfunctionology", textbook covering this topic:

My problem is I actually don't know what author had in mind. What does it mean that "every term from the series (2.1.4) contributes to the coefficient of each power of x"? And why exactly $g_0$ must be equal to $0$ in order for $f(g(x))$ to be well defined?
 A: First of all you have to keep in mind that the definition of formal power serie is nothing more then sequence $(a_n)_{n\in \mathbb{N}}$ which we write ;
$$f=\sum_{n} a_nx^n \tag{1}$$
so in order to have a well defined formal power series we must know all the terms of the sequence $a_n$, as an example we can define the sum of two formal power series $f=\sum_n a_nx^n$ and $g=\sum_nb_nx^n$ as $(f+g)=\sum_n s_nx^n$, with $s_n=a_n+b_n$ now why the this sum is well defined? because for every $n$ we know the exact value of $s_n$ which is $a_n+b_n$.
A simple example
Now let's take a simple example, $f=\sum_n a_nx^n$ and $g=1+x$ and let's try to define $f\circ g$, the usual defines requires that $$f\circ g=\sum_n a_n(1+x)^n \tag 2$$ but this is not an accepted definition, remember that we must know the exact value of the coefficients $c_i$ of $f\circ g=\sum_n c_ix^i$, in particular we must know the value of $c_0$, but if we develop the sum we obtain the term corresponding to $x^0$ is the sum of all constant terms in the definition $(2)$ (The author says here "that every term from the series $(2.1.4)$ contributes to the coefficient " of the constant term in particular ) hence $c_0$ must be:
$$c_0=\sum_{n}a_n $$
but we don't know how to calculate infinite sums in a ring, so we can not calculate $c_0$, and we don't know its exact value that's why our definition $(2)$ is invalid!
General case
Now let let $f=\sum_na_nx^n$ and $g=\sum_nb_nx^n$ and define $f\circ g $ as follow:
$$f\circ g==\sum_n c_nx^n=\sum_n a_n(b_0+b_1x+b_2x^2+\cdots+b_nx^n+\cdots)^n \tag{3}$$
can we calculate $c_0$ ? No, as in the example, we can not calculate $c_0$ if $b_0\neq 0$ because we don't know how to compute the infinite sum $$ c_0=\sum_n a_nb_0^n$$
now we proved that if $b_0\neq 0$ then the definition $(3)$ is invalid, now suppose that $b_0=0$ and we need to prove that we can calculate each $c_n$, this easy because each $c_i$ will be defined as a finite sum which we know how to evaluate it, in this case the definition$(3)$ becomes:
$$f\circ g==\sum_n c_nx^n=\sum_n a_nx^n(b_1+b_2x^1+\cdots+b_nx^{n-1}+\cdots)^n \tag{4}$$
and here you can observe that in order to compute $c_k$ it suffices to determine the coefficients of $x^k$ for the first exponent $n\leq k$ in the sum $(4)$ because when we exceed $k$ all powers will be greater $x^{k+1}$, so the sum will be finite, a formul definition of this sum is:
$$c_n:=\sum_{k\in\mathbb{N}, \vert j\vert=n} a_k a_{j_1} b_{j_2} \cdots b_{j_k}$$
Here the sum is extended over all $(k, j)$ with $k$ in $\mathbb{N}$ and $j\in\mathbb{N}_+^k$ with $|j|:=j_1+\cdots+j_k=n$, and this is a finite set, and we know how to compute finite sums.

Advanced topic
This problem of defining the composition for formal power series is very interesting, One of the important problem related to this problem is  determining suﬃcient conditions for the existence of the composition of formal power series. Some development covering this problem can be found in the article On composite formal power series where Chaumat and Chollet investigated the radius of convergence of composed formal power series and obtained some very good results.
