In mathematics, an ergodic sequence is a certain type of integer sequence, having certain equidistribution properties. In mathematics, an ergodic sequence is a certain type of integer sequence, having certain equidistribution properties. Let A = { a j } {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 1 ≤ k ≤ q {displaystyle 1leq kleq q} , one has