  The Skolem-Mahler-Lech theorem states that if $f(n)$ is a sequence given by a
linear recurrence over a field of characteristic 0,then the set of $m$ such
that $f(m)$ is equal to 0 is the union of a finite number of arithmetic
progressions in $m\ge 0$ and a finite set. We prove that if $X$ is a subvariety
of an affine variety $Y$ over a field of characteristic 0 and ${\bf q}$ is a
point in $Y$, and $\sigma$ is an automorphism of $Y$, then the set of $m$ such
that $\sigma^m({\bf q})$ lies in $X$ is a union of a finite number of complete
doubly-infinite arithmetic progressions and a finite set. We show that this is
a generalization of the Skolem-Mahler-Lech theorem.
