Skip to main content
OlympiadHQ

Browse · MathNet

Print

Estonian Mathematical Olympiad

Estonia number theory

Problem

Kati writes the numbers on the board. In each step, she performs one of the following operations: (1) She can pick two numbers and replace them with their greatest common divisor and least common multiple; or (2) She can pick two numbers, one of which is divisible by the other, and replace them with some two numbers whose greatest common divisor and least common multiple would be the two picked numbers. Find the least and the greatest sum of all numbers on the board that can be achieved via finitely many steps.
Solution
At all points throughout the process, every number on the board can be written as for some . Moreover, the list of exponents of both and does not change throughout the process. Indeed, in a step of the first kind, two numbers and are turned into and , preserving both the exponents of and the exponents of . A step of the second kind is just the reverse of a step of the first kind, so the exponents are preserved again. Thus the lists of both the exponents of and are

By the rearrangement inequality, we obtain that the sum of the numbers on the board is the greatest when they are The sum of these numbers equals . These numbers can be achieved by performing a step of the first kind on the numbers and for every .

By the rearrangement inequality, we obtain that the sum of the numbers on the board is the least when the lists of the exponents of and are sorted in opposite directions. This means that the numbers would be Using the formula for the sum of a geometric series for each row, separately for numbers at odd positions and even positions, yields: for the first row, and ; for the second row, and ; * for the third row, and .

Thus the sum of all the numbers is . This is indeed achievable. For this, we will pair the first desired number with the last one, the second first number with the second last one, etc. The least common multiples of the pairs are and the greatest common divisors are . Finally, is left over. This means that we can use steps of the second kind to achieve the desired numbers from the situation with the maximal sum.
Final answer
Greatest sum: 101 + 2(6^101 - 1)/5. Least sum: 2^102 - 32^51 + 2*3^50 + 3^101.

Techniques

Greatest common divisors (gcd)Least common multiples (lcm)Combinatorial optimizationSums and products