A sequence over a finite alphabet (one- or two-sided, though I'll show only the one-sided case) `x`_{1}, `x`_{2}, ... is called *recurrent* if every word `w`=`x`_{m}...`x`_{m+l-1} that appears in it once appears in it infinitely often.

That is, for every `N` there exists `k`>`N` for which `w`=`x`_{k}...`x`_{k+l-1}.

Every periodic sequence is recurrent. Every recurrent sequence is strongly recurrent (but the converse is of course false). See that node for examples of (*strongly*) recurrent sequences that are not periodic.

To generalize, note that a finite alphabet has only a single metric topology; two sequences are close if they share a long common initial prefix.

So we can use a more interesting space by adding in a metric. A sequence `x`_{1}, `x`_{2}, ... over any metric space X (again, one- or two-sided, but I'll only show the one-sided case) is called *recurrent* if it approaches itself infinitely often, that is if for every n and ε,

d((`x`_{n}, `x`_{n+1}, ...), (`x`_{n+k}, `x`_{n+k+1}, ...)) ≤ ε

for infinitely many values k.

In other words, if the trajectory of a point x visits any point σ^{n}x, then it visits any neighborhood of x infinitely often.