TITLE: Given a formal power series ,decide whether there exists a polynomial the series satisfies and if it exists,how to write it down?
QUESTION [5 upvotes]: Given a formal power series $$y(x)=\sum_{i=0}^{\infty} a_i x^i$$ Is there an algorithm that decides whether there exists a polynomial$$ P(x,y)=p_n(x)y^n+p_{n-1}(x)y^{n-1}+\cdots+p_0(x)=0,p_j(x)\in F[x]$$the series satisfies  and if it exists,how to write it down?

REPLY [13 votes]: One result in this area is Christol's theorem, which asserts that
an element of $\mathbf{F}_p[[X]]$ is algebraic over $\mathbf{F}_p(X)$
if and only if its sequence of coefficients is a $p$-automatic sequence,
which means that there is a finite state machine for which
the coefficient of $X^n$ is the output of this machine upon input
the base $p$ expression of $n$.
This is relevant because if an element of $\mathbf{Z}[[X]]$ is algebraic over
$\mathbf{Q}(X)$, then its reduction modulo any prime $p$ will be algebraic
over $\mathbf{F}_p(X)$.
For further results, and applications of these theorems to prove that certain elements of $\mathbf{Z}[[X]]$ are transcendental over $\mathbf{Q}(X)$, see the book "Automatic Sequences" by Jean-Paul Allouche and Jeffrey Shallit.

REPLY [12 votes]: No, there is no algorithm.  Suppose there were.  Consider a polynomial $q$ in $k$ variables.
Let $a_n = 1/n!$ if $n=2^{2^m}$, and $q(x)=0$ for $x$ the $m^{th}$ $k$-tuple of integers in some enumeration.
Let $a_n=0$ otherwise.
If $q$ has only finitely many roots, then the desired polynomial $p$ exists (trivially with $p_1=1, p_0=-y$).  If $q$ has infinitely many roots, then no such $p$ exists, because the non-zero terms are too spread out for any polynomial identity to hold.
So an algorithm to find $p$ would also decide whether $q$ has finitely many roots or not, and there is no such algorithm by the solution to Hilbert's tenth problem.