Suppose we have a initial segment $x\_1,\ldots,x\_N$ (for reasonably large $N$) of a sequence of natural numbers $(x\_i)$. We have reason to believe the generating function $\sum\_{i=0}^\infty x\_iX^i$ is rational. Are there any methods one could use to guess/approximate this generating function as a quotient of polynomials $P(X)/Q(X)$ with small degrees (relative to $N$).



Approximating rational generating functions
This is called Padé approximation. There are several computer packages that can do that, in particular GFUN (Salvy and Zimmermann) for maple, Guess (Kauers) for mathematica, in FriCAS it's built-in (the function is called guessPade). You can access the latter also from sage, although very likely there is something built-in too.


