Maths Olympiad Prep

Library / /51 of 136

Number theory Difficulty 7.7 National Olympiad, round 2 Prove it Hong Kong

Given a list of integers 21+1,22+1,,22019+12^1 + 1, 2^2 + 1, \dots, 2^{2019} + 1, Adam chooses two different integers from the list and computes their greatest common divisor. Find the sum of all possible values of this greatest common divisor.

Solution

The answer is 2674+6722^{674} + 672.

We claim that both (2r+1,2s+1)(2^r + 1, 2^s + 1) and (2r+1,2s1)(2^r + 1, 2^s - 1) are of the form 2a+12^a + 1 or 11 for any r,sZ+r, s \in \mathbb{Z}^+. We prove this by induction on min{r,s}\min\{r, s\}. The base case min{r,s}=1\min\{r, s\} = 1 is trivial since the greatest common divisor can only be 11 or 33. Assume this holds for all smaller cases and consider the inductive step.

For (2r+1,2s+1)(2^r + 1, 2^s + 1), WLOG assume rsr \le s. Let s=qr+bs = qr + b where 0b<r0 \le b < r. Then
2s+1=2b(2r)q+12b(1)q+1=±2b+1(mod2r+1). 2^s + 1 = 2^b(2^r)^q + 1 \equiv 2^b(-1)^q + 1 = \pm 2^b + 1 \pmod{2^r + 1}.
This shows (2r+1,2s+1)=(2r+1,2b±1)(2^r + 1, 2^s + 1) = (2^r + 1, 2^b \pm 1). As b<rb < r, we are done by the inductive hypothesis.

Similarly, for (2r+1,2s1)(2^r + 1, 2^s - 1), if rsr \le s, then we write s=qr+bs = qr + b for some 0b<r0 \le b < r so that (2r+1,2s1)=(2r+1,2b±1)(2^r + 1, 2^s - 1) = (2^r + 1, 2^b \pm 1). If s<rs < r, then we write r=qs+br = qs + b for some 0b<s0 \le b < s so that (2r+1,2s1)=(2b+1,2s1)(2^r + 1, 2^s - 1) = (2^b + 1, 2^s - 1). In any case, we are done by the inductive hypothesis.

So we have proven the claim by induction. Next, note that 2a+12r+12^a + 1 \mid 2^r + 1 if and only if r=dar = da for some odd integer dd. (Again, by writing r=qa+br = qa + b with 0b<a0 \le b < a, we can show that 2a+12b(1)q+12^a + 1 \mid 2^b(-1)^q + 1 and hence 2a+12b(1)q+12^a + 1 \le |2^b(-1)^q + 1| unless 2b(1)q+1=02^b(-1)^q + 1 = 0. As b<ab < a, the former case is impossible.) Therefore, the greatest common divisor of two terms is 2a+12^a + 1 only if both are of the form 2(2k1)a+12^{(2^k-1)a} + 1. In particular, we cannot have a>673a > 673 since otherwise one term is at least 23(674)+1>22019+12^{3(674)} + 1 > 2^{2019} + 1.

On the other hand, aa can be one of 1,2,,6731, 2, \dots, 673 as (2a+1,23a+1)=2a+1(2^a + 1, 2^{3a} + 1) = 2^a + 1.

Obviously, the greatest common divisor can also be 1. So the answer is
1+(21+1)+(22+1)++(2673+1)=2674+672. 1 + (2^1 + 1) + (2^2 + 1) + \cdots + (2^{673} + 1) = 2^{674} + 672.

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.