Maths Olympiad Prep

Library / /19 of 87

Number theory Difficulty 5.7 AIME, harder Prove it Russia

Let nn be a positive integer. Positive integers 1,2,,n1, 2, \dots, n are written in a row in some order. For any two neighboring numbers their GCD is written on the paper. Find the greatest possible number of distinct numbers among all n1n-1 numbers written on the paper.

Solution

Ответ. n/2\lfloor n/2 \rfloor.

Решение. Upper bound. Assume one of the written numbers is greater than n/2\lfloor n/2 \rfloor, say, GCD(a,b)=d>n/2\text{GCD}(a, b) = d > \lfloor n/2 \rfloor. Then the larger of the numbers a,ba, b must be at least 2d2d, which exceeds nn - a contradiction. Therefore, each written GCD cannot exceed n/2\lfloor n/2 \rfloor, and thus the number of distinct GCDs cannot be greater than n/2\lfloor n/2 \rfloor.

Example. Let's partition all numbers from 11 to nn into chains of the form a,2a,4a,8a,,2kaa, 2a, 4a, 8a, \dots, 2^k a, where aa is an odd number not exceeding nn. Write these chains consecutively in a row. Then for any natural number dn/2d \le \lfloor n/2 \rfloor, there exists a chain containing dd where the number following dd is 2d2d. We see that every natural number dn/2d \le \lfloor n/2 \rfloor will appear on the sheet.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.