Fast computation of the $N$th term of an algebraic series in positive characteristic
We address the question of computing one selected term of an algebraic power series. In characteristic zero, the best known algorithm for computing the Nth coefficient of an algebraic series uses differential equations and has arithmetic complexity quasi-linear in √ N . We show that in positive characteristic p, the complexity can be lowered to O(logN). The mathematical basis of this dramatic improvement is a classical theorem stating that a formal power series with coefficients in a finite field is algebraic if and only if the sequence of its coefficients can be generated by an automaton. We revisit and enhance two constructive proofs of this result. The first proof uses Mahler equations; their size appear to be prohibitively large. The second proof relies on diagonals of rational functions; we turn it into an efficient algorithm, of complexity linear in logN and quasi-linear in p.