Ergodic sequence

In mathematics, an ergodic sequence is a certain type of integer sequence, having certain equidistribution properties.
Definition.
Let formula_1 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 formula_2, one has
where
and card is the count (the number of elements) of a set, so that formula_5 is the number of elements in the sequence "A" that are less than or equal to "t", and
so formula_7 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 formula_9. 
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 formula_10 be a probability space of random variables over two letters formula_11. Then, given formula_12, the random variable formula_13 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 formula_14 is the sequence of integers
Then almost every sequence formula_16 is ergodic.