MathLabs

Problem 5

Let n≥3n\ge3 be a fixed integer. The number 11 is written nn times on a blackboard. Below the blackboard, there are two buckets that are initially empty. A move consists of erasing two of the numbers aa and bb, replacing them with the numbers 11 and a+ba+b, then adding one stone to the first bucket and gcd⁡(a,b)\gcd(a,b) stones to the second bucket. After some finite number of moves, there are ss stones in the first bucket and tt stones in the second bucket, where ss and tt are positive integers. Find all possible values of the ratio ts\dfrac{t}{s}.
Step 3 of 6: A weighted potential dominates t
q=∑i=1n(i−1)ai,Δq≥a≥gcd⁡(a,b)=Δt ⇒ q−t non-decreasingq=\sum_{i=1}^n (i-1)a_i,\quad \Delta q\ge a\ge\gcd(a,b)=\Delta t\ \Rightarrow\ q-t\ \text{non-decreasing}
Detailed analysis

Write the nn numbers on the board in a row and let q=∑i=1n(i−1)aiq=\sum_{i=1}^n(i-1)a_i using their left-to-right positions, with a+ba+b always written in the position of the right-hand erased number. If positions i<ji<j held a,ba,b, the move changes qq by (i−1)(1−a)+(j−1)((a+b)−b)=(i−1)+a(j−i)≥a≥gcd⁡(a,b)(i-1)(1-a)+(j-1)((a+b)-b)=(i-1)+a(j-i)\ge a\ge\gcd(a,b). Hence q−tq-t never decreases, so q−t≥q0−t0=n(n−1)2q-t\ge q_0-t_0=\tfrac{n(n-1)}2 throughout, where q0=n(n−1)2q_0=\tfrac{n(n-1)}2 is the initial value (all numbers equal to 11) and t0=0t_0=0.