In mathematics, an ergodic sequence is a certain type of integer sequence, having certain equidistribution properties.

Definition
Let  be an infinite, strictly increasing sequence of positive integers. Then, given an integer q, this sequence is said to be ergodic mod q  if, for all integers , one has

where

and card is the count (the number of elements) of a set, so that  is the number of elements in the sequence A that are less than or equal to t, and

so  is the number of elements in the sequence A, less than t, that are equivalent to k modulo q. That is, a sequence is an ergodic sequence if it becomes uniformly distributed mod q as the sequence is taken to infinity.

An equivalent definition is that the sum

vanish for every integer k with . 

If a sequence is ergodic for all q, then it is sometimes said to be ergodic for periodic systems.

Examples
The sequence of positive integers is ergodic for all q.

Almost all Bernoulli sequences, that is, sequences associated with a Bernoulli process, are ergodic for all q. That is, let  be a probability space of random variables over two letters .  Then, given , the random variable  is 1 with some probability p and is zero with some probability 1-p; this is the definition of a Bernoulli process. Associated with each  is the sequence of integers

Then almost every sequence  is ergodic.

See also
Ergodic theory
Ergodic process, for the use of the term in signal processing

Ergodic theory
Integer sequences