Let
t
0
,
t
1
,
t
2
,
⋯
{t_0},{t_1},{t_2}, \cdots
be a sequence of elements of a field F. We give a continued fraction algorithm for
t
0
x
+
t
1
x
2
+
t
2
x
3
+
⋯
{t_0}x + {t_1}{x^2} + {t_2}{x^3} + \cdots
. If our sequence satisfies a linear recurrence, then the continued fraction algorithm is finite and produces this recurrence. More generally the algorithm produces a nontrivial solution of the system
\[
∑
j
=
0
s
t
i
+
j
λ
j
,
0
⩽
i
⩽
s
−
1
,
\sum \limits _{j = 0}^s {{t_{i + j}}{\lambda _j},\quad 0 \leqslant i \leqslant s - 1,}
\]
for every positive integer s.