Two positive integers are given. There is a blackboard with positive integers written on it. A operation is to choose two same number written on the blackboard, and replace them with . Determine the smallest so that such operation can go on infinitely.
Solution
Given two positive integers and , we are to determine the smallest number such that the operation of choosing two identical numbers on the blackboard and replacing them with and can go on infinitely.
To solve this, we first note that we can assume by scaling, because the problem is invariant under scaling by the greatest common divisor.
We claim that the smallest is . When , this simplifies to .
To see that is sufficient, consider a board with the set . This configuration can last forever under the given operation.
We now show that is necessary. Assume is minimal, which implies that every entry is changed infinitely many times. We consider the entire blackboard as generating an infinite table with columns, such that each row is obtained from the previous one by replacing with (for some ), and each column is unbounded.
Without loss of generality, we can assume (by shifting and rearranging) that the first two entries of the first row are , and all others are nonnegative. We add the condition that whenever the first column is erased, we increment that entry by , and whenever the second column is erased, we increment that entry by . Thus, the first column will contain all positive multiples of and the second column will contain all positive multiples of .
Claim: Let . Then for every , there exists a column other than the first or second column such that .
Proof: Let and assume (the other case is similar). Since it is incremented by in the first column, there must be some column containing followed immediately by . That column then cannot contain any larger elements of . Indeed, the next smallest multiples of and exceeding are and , respectively.
Hence, the number of columns is at least , as needed.
The answer is .