There is a close relationship between generating functions and formal power series.
However, they are not the same. Given a sequence, $\,a_0,a_1,a_2,\dots,\,$ define the
formal power series $\,f(x):=a_0+a_1x+a_2x^2+\dots\,$ associated to the sequence.
The sequence and the formal power series are almost exactly the same except
for the $\,x\,$ associated with the power series. Note that the $\,f(x)\,$
and the power series are defined to be exactly the same. The notation $\,f(x)\,$ suggests that it is a function, but with restrictions
since the series may not converge for all $\,x,\,$ hence the reason for the "formal"
in the name. For example, $\,f(rx) = a_0+a_1rx+a_2r^2x^2+\dots\,$ is defined
but $\,f(1+x)\,$ is not defined. So $\,f(y)\,$ is defined for $\,y\,$
being a formal power series with constant term of $\,0.$ It is a function
defined on a subset of formal power series. More precisely, there is an
operation of substitution defined on formal power series, with restrictions,
and if $\,y:=b_1x+b_2x^2+\dots,\,$ then $\,f(y)\,$ denotes the substitution
of $\,y\,$ into $\,f(x).\,$ Thus, $\,f(x)\,$ is an ordinary formal power
series, but the substitution (also known as the evaluation) operation which
maps $\,y\,$ to $\,f(y)\,$ is the "function" associated with $\,f(x).\,$
The idea is that an ordinary algebraic expression, for example,
$\,\frac{1}{1-rx}\,$ may be "expanded" into the power series $\,1+rx+rx^2+\dots\,$
associated with the sequence $\,1,r,r^2,\dots\,$ and hence $\,\frac{1}{1-rx}\,$ is
the generating function of the sequence. The idea is that the generating function
may sometimes be determined algebraically using some recurrence satisfied by the
sequence and that this may help to determine an expression for the sequence itself.
In the example, the recurrence relation $\,a_{n+1}=r\,a_n\,$ with initial value of
$\,a_0=1\,$ is translated into the algebraic equation $\,\frac{f(x)-1}x=r\,f(x)\,$
whose unique solution is $\,f(x)=\frac{1}{1-rx}.\,$
There are variations of generating functions besides the usual, ordinary one. For
example, $\,f(x):= a_0 + a_1\frac{x^1}{1!} + a_2\frac{x^2}{2!}+\dots\,$ is called
the exponential generating function of the sequence. Another example,
$\,f(s):= \frac{a_1}{1^s}+\frac{a_2}{2^s}+\frac{a_3}{3^s}\dots\,$ is called the
Dirichlet generating function of the sequence.
Best Answer
A formal power series in the ring $R$ is a sequence $$ (a_0, a_1, \ldots ), $$ where the $a_i$ lie in $R$, although this is more often denoted by $$ \sum_{n=0}^\infty a_nX^n. $$ Nevertheless, all of the symbols you see above, except for the coefficients $a_i$ themselves, are just superfluous decorations.
The set of all formal power series is denoted by $R[[X]]$ and it has the structure of a ring, where you add two formal power series just by adding their respective coefficients, while the multiplication is defined by $$ \Big (\sum_{n=0}^\infty a_nX^n\Big ) \Big (\sum_{n=0}^\infty b_nX^n\Big )= \Big (\sum_{n=0}^\infty c_nX^n\Big ), $$ where $$ c_n:= \sum_{k=0}^n a_k b_{n-k}. $$
In addition, $R[[X]]$ is a topological ring by identifying it with the product topological space $R^{\mathbb N}$ in the obvious way, where $R$ is given the discrete topology.
This means that a sequence $$ \Big\{\sum_{n=0}^\infty a_{n, k}X^n\Big\}_k $$ converges to an element $\sum_{n=0}^\infty a_nX^n$ in $R[[X]]$, if and only for every $n$, there is a $k_0$, such that $a_{n,k}= a_n$, for every $k\geq k_0$. In others words, if you focus on the coefficients of a single $X^n$, you'll notice they stop changing after a while.
Whenever you have a topological ring, you can make sense of convergence of "infinite sums", such as, $\sum_{n=0}^\infty P_n$, by simply interpreting it as the sequence of partial sums $$ \Big\{\sum_{n=0}^N P_n\Big\}_N. $$
In the case of $R[[X]]$, one may choose $P_n: = a_nX^n$ as a formal power series in which all coefficients, except for $a_n$, are taken to be zero. In that case you may ask whether or not the "infinite sum" $$ \sum_{n=0}^\infty a_nX^n. $$ converges in $R[[X]]$. Besides observing that the above is NOT to be understood as an element of $R[[X]]$ (it is an infinite sum of elements of $R[[X]]$), it is not hard to see that it does converge (Exercise: prove it!) to the element of $R[[X]]$ you might write as $(a_0, a_1, \ldots )$ in its most formal presentation.
This might be expressed by saying that every power series converges in the ring of formal power series, regardless of how big the coefficients are!