Problem 3
Let be an infinite sequence of positive integers, and let be a positive integer. Suppose that, for each , the number is equal to the number of times appears in the list . Prove that at least one of the sequences and is eventually periodic.
Step 6 of 6: Pigeonhole forces eventual periodicity
In plain words
With only finitely many states available and a deterministic rule advancing the state by two indices at a time, the sequence of states must eventually repeat a value, and after that everything cycles forever.
Detailed analysis
Since takes finitely many values as ranges over (Step 5) and is a deterministic function of , by pigeonhole some state repeats, for some with ; from that point on the states cycle with period , and in particular the corresponding subsequence of 's (indices of one fixed parity) is eventually periodic. Since has a definite parity, this shows one of the two subsequences or is eventually periodic.