Arithmetic Progressions and Ergodic Theory