MathLabs

Problem 3

Let a1,a2,a3,…a_1,a_2,a_3,\ldots be an infinite sequence of positive integers, and let NN be a positive integer. Suppose that, for each n>Nn>N, the number ana_n is equal to the number of times an−1a_{n-1} appears in the list (a1,a2,…,an−1)(a_1,a_2,\ldots,a_{n-1}). Prove that at least one of the sequences a1,a3,a5,…a_1,a_3,a_5,\ldots and a2,a4,a6,…a_2,a_4,a_6,\ldots is eventually periodic.
Step 5 of 6: A finite-state description of the small terms
In plain words

Only the relative heights among the L unboundedly growing towers matter for predicting the next small term two steps later, and Step 2's bound keeps these relative heights confined to finitely many possibilities.

T(n)=(h1−h2,…,hL−1−hL,an)T(n)=(h_1-h_2,\ldots,h_{L-1}-h_L,a_n)
Detailed analysis

For n≡N′(mod2)n\equiv N'\pmod2, use the heights after BnB_n and define T(n)=(h1−h2,h2−h3,…,hL−1−hL,an)T(n)=(h_1-h_2,h_2-h_3,\ldots,h_{L-1}-h_L,a_n). We spell out the two-step transition. Put q=hanq=h_{a_n}; by Step 4, q=an+1>Mq=a_{n+1}>M. The next block is placed in tower qq. Since every tower with label greater than MM has height at most MM, after this placement the next small term is an+2=#{i:hi≥q}a_{n+2}=\#\{i:h_i\ge q\}, where only i=1,…,Li=1,\ldots,L can contribute. The value of this count is determined by the relative heights, because qq is one of the heights h1,…,hLh_1,\ldots,h_L. Then Bn+2B_{n+2} increments tower an+2a_{n+2} by one, so all successive differences and the last coordinate are determined from T(n)T(n). To see that the state set is finite, Step 2 gives hk+1≤hk+Ch_{k+1}\le h_k+C; we also claim hk≤hk+1+C(L−1)h_k\le h_{k+1}+C(L-1) for k<Lk<L. If this failed just after tower kk was updated, then hk>hk+1+C(L−1)h_k>h_{k+1}+C(L-1). Repeatedly using hj≥hj+1−Ch_j\ge h_{j+1}-C shows that every one of h1,…,hkh_1,\ldots,h_k is larger than every one of hk+1,…,hLh_{k+1},\ldots,h_L. Let q=hkq=h_k; then exactly the first kk towers have height at least qq, so the next small term is kk, and the same two-step transition updates tower kk forever. This leaves towers k+1,…,Lk+1,\ldots,L bounded, contradicting their definition. Hence all adjacent differences lie in a fixed finite interval, and with an∈{1,…,L}a_n\in\{1,\ldots,L\}, only finitely many states T(n)T(n) occur.