# Ergodic sequence

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

## Definition

Let ${\displaystyle A=\{a_{j}\}}$ 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 ${\displaystyle 1\leq k\leq q}$, one has

${\displaystyle \lim _{t\to \infty }{\frac {N(A,t,k,q)}{N(A,t)}}={\frac {1}{q}}}$

where

${\displaystyle N(A,t)={\mbox{card}}\{a_{j}\in A:a_{j}\leq t\}}$

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

${\displaystyle N(A,t,k,q)={\mbox{card}}\{a_{j}\in A:a_{j}\leq t,\,a_{j}\mod q=k\}}$

so ${\displaystyle N(A,t,k,q)}$ 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

${\displaystyle \lim _{t\to \infty }{\frac {1}{N(A,t)}}\sum _{j;a_{j}\leq t}\exp {\frac {2\pi ika_{j}}{q}}=0}$

vanish for every integer k with ${\displaystyle k\mod q\neq 0}$.

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 ${\displaystyle (\Omega ,Pr)}$ be a probability space of random variables over two letters ${\displaystyle \{0,1\}}$. Then, given ${\displaystyle \omega \in \Omega }$, the random variable ${\displaystyle X_{j}(\omega )}$ 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 ${\displaystyle \omega }$ is the sequence of integers

${\displaystyle \mathbb {Z} ^{\omega }=\{n\in \mathbb {Z} :X_{n}(\omega )=1\}}$

Then almost every sequence ${\displaystyle \mathbb {Z} ^{\omega }}$ is ergodic.