# 2011 IMO Problems/Problem 1

## Problem

Given any set $A = \{a_1, a_2, a_3, a_4\}$ of four distinct positive integers, we denote the sum $a_1 +a_2 +a_3 +a_4$ by $s_A$. Let $n_A$ denote the number of pairs $(i, j)$ with $1 \leq i < j \leq 4$ for which $a_i +a_j$ divides $s_A$. Find all sets $A$ of four distinct positive integers which achieve the largest possible value of $n_A$.

Author: Fernando Campos, Mexico

## Solution 1

Firstly, if we order $a_1 \ge a_2 \ge a_3 \ge a_4$, we see $2(a_3 + a_4) \ge (a_1+a_2)+(a_3+a_4) = s_A \geq 0$, so $(a_3, a_4)$ isn't a couple that satisfies the conditions of the problem. Also, $2(a_4 + a_2) = (a_4 + a_4) + (a_2 + a_2) \ge (a_4+a_3)+(a_2+a_1) = s_A \ge 0$, so again $(a_2, a_4)$ isn't a good couple. We have in total 6 couples. So $n_A \leq 6-2=4$.

We now find all sets $A$ with $n_A = 4$. If $(a,b)$ and $(c,d)$ are both good couples, and $A=\{a, b, c, d\}$, we have $a+b=c+d=s_A/2$. So WLOG $A=\{a,b,a+x,b-x\}$ with $x > 0$ and $a < b, b-x, a+x$. It's easy to see $a=a_1$ and since $(a_2, a_4),(a_3,a_4)$ are bad, all couples containing $a$ must be good. Obviously $(a,b)$ and $(a+x,b-x)$ are good ($s_A=2(a+b)$). So we have $2a+x | 2a+2b$ and $a+b-x|2a+2b \Rightarrow a+b-x|2x$.

Using the second equation, we see that if $y=a+b$, $y-x|2x \Rightarrow yk_1-xk_1=2x \Rightarrow yk_1 = x(2+k_1) \Rightarrow y=x((2+k_1)/k_1)$, for some $k_1$ a positive integer.

So now we use the first equation to get $2ak_2 + xk_2 = 2y = 2x(2+k_1)/k_1 \Rightarrow 2ak_2 = x(\frac{4+2k_1}{k_1}-k_2) \Rightarrow 2a=x(\frac{4+2k_1}{k_1k_2} - 1)$, for a natural $k_2$.

Finally, we obtain $k_1 | 4+2k-1 \Rightarrow k_1 | 4 \Rightarrow k_1=$ 1, 2 or 4. We divide in cases:

CASE I: $k_1=1$. So $y=3x$ and $2a=x((\frac{6}{k_2}) -1)$. But $a < b-x \Rightarrow 2a < y-x=2x \Rightarrow (6/k_2) - 1 < 2 \Rightarrow k_2 > 2 \Rightarrow k_2 =$3, 4,5 or 6. $k_2=6$ implies $a=0$, impossible. $a=x$ when $k_2=3$. We easily see $b=3x=3x$ and $A=\{x, 3x, 3x-x, 2x\}$, impossible since $3x-x=2x$. When $k_2=4$, $a=x/4=y/12$, and we get $\{11a, a, 5a, 7a\}$.Uf $k_2=5$, $a=x/5=y/15$ and we get $\{a, 14a, 6a, 9a\}$.

CASE II and III:$k_1=$2, 4. Left to the reader.

ANSWER: $\{11a, a, 5a, 7a\}$,$\{a, 11a, 19a, 29a\}$, for any positive integer $a$.

(Note: The above solution looks generally correct, but the actual answer should be $\{11a, a, 5a, 7a\}$,$\{a, 11a, 19a, 29a\}$. You can check that $\{a, 14a, 6a, 9a\}$ doesn't actually work. -Someone who didn't write up the above solution but solved the problem in a similar way)

## Solution 2 (Avoids the error of the first)

Similarly to the first solution, let us order the terms in set $A$ by $0 < a_1 < a_2 < a_3 < a_4$ since it is given that these four integers must be distinct and positive. Obviously, $s_a > 0$ from this. We know that pair $(a_3, a_4)$ cannot work because $2(a_3 + a_4) > a_1 + a_2 + a_3 + a_4 = s_A.$ Additionally, pair $(a_2, a_4)$ cannot work for the same reason: $2(a_2 + a_4) = a_4 + a_4 + a_2 + a_2 > s_A.$

Hence, since there were only ${4 \choose 2} = 6$ pairs $(i, j)$ in total, and two pairs are guaranteed not to work, we are to find sets $A$ satisfying $n_A = 6 - 2 = 4.$ Due to our making $a_4$ the largest term of set $A$, the only way to have a pair $(a_i, a_4)$ that exists such that $a_i + a_4 | s_A$ is to make $i$ equal to 1 and find an $a_1$ such that $\frac{s_A}{a_1 + a_4} = 2.$ When this happens, we know that $\frac{s_A}{a_2 + a_3} = 2$, as well. It clearly follows that we need pairs $(a_1, a_2)$ and $(a_1, a_3)$ that exist such that both $a_1 + a_2$ and $a_1 + a_3$ divide $s_A.$

To satisfy conditions $\frac{s_A}{a_1 + a_4} = 2$ and $\frac{s_A}{a_2 + a_3} = 2$, choose a set $A$ with four distinct positive integer elements $a - x, a, b, b + x$ with $0 < a - x < a < b < b + x.$ Obviously, $x < a < b$ for our set to consist solely of positive integers. The problem becomes to find $x, a,$ and $b$ such that $2a - x | 2(a + b)$ and $(a + b) - x | 2a + 2b.$

We realize that $x$ can be any positive even integer. This allows $2a - x$ and $2(a + b)$ to have a common factor of 2, simplifying our problem a bit. Hence, $a - \frac{x}{2}$ must divide $(a + b).$ Now, we can look at the other condition, $(a + b) - x | 2a + 2b$, to solve this problem. To find $a, b, x$ satisfying $(a + b) - x | 2a + 2b$, it suffices to define a positive integer $n$ that makes $n(a + b - x) = 2(a + b) \Rightarrow 0 = (n - 2)a + (n - 2)b - nx \Rightarrow (n - 2)(a + b) = nx.$ Note that $x$ must be less than $\frac{a + b}{2}.$ If $x \ge \frac{a + b}{2}$, $(n - 2)(a + b) = nx$ would have solutions $x, a,$ and $b$ that will make $a - x < 0$, since $a < \frac{a + b}{2}$ due to $a < b.$ This is a contradiction with the condition that each element in set $A$ has to be positive. Despite this, We move on to some cases.

• $0 < n \le 2$ cannot work because this makes at least one of the solutions $a, b, x$ to $(n - 2)(a + b) = nx$ zero or negative, another contradiction.
• For $n = 3$, we have that $a + b = 3x.$ We need to find possible values for $a$ such that $x < a < \frac{a + b}{2}$ that satisfy both $a + b = 3x$ and $a - \frac{x}{2} | (a + b) \Rightarrow a - \frac{x}{2} | 3x.$ Note that because $(a + b) = 3$, the sum of our set $A$ is $2(a + b) = 6x.$ Hence, it suffices to call our terms $a -x, a, 3x - a,$ and $4x - a.$ The only values for $a$ and $x$ that work are those such that $5 | a$ and $4 | x$ at the same time, and $11 | a$ and $10 | x$ at the same time. Hence, we get that $a - x = \frac{a}{5}$ or $\frac{a}{11}.$ Moreover, it follows that $x = \frac{4a}{5}$ or $\frac{10a}{11.}$ On a side note, because we are constrained to $x < a < \frac{a + b}{2}$, $\frac{a}{5} = \frac{x}{4}$ or $\frac{a}{11} = \frac{x}{10}$. Note that this completely satisfies $a - \frac{x}{2} | 3x$ because the $a$ and $x$ that we chose exists such that $4(a - \frac{x}{2}) = 3x$ for $5 | a$, $4 | x$, and $\frac{a}{5} = \frac{x}{4}$. At the same time, $5(a - \frac{x}{2}) = 3x$ for $11 | a$, $10 | x$, and $\frac{a}{11} = \frac{x}{10}$. In turn, we have the two sets $A = \{\frac{a}{5}, a, \frac{7a}{5}, \frac{11a}{5}\}$ and $\{\frac{a}{11}, a, \frac{19a}{11}, \frac{29a}{11}\}.$ Since $a$ must be a multiple of 5 or 11, we can scale these two sets by multiplying by 5 and 11, respectively, to get sets $A = \{p, 5p, 7p, 11p\}$ and $\{p, 11p, 19p, 29p\}$ with $p$ being any $\frac{a}{5}$ or $\frac{a}{11}$ that results in positive integers for the first and second set, respectively. Remember that $a$ cannot be zero because our set must contain positive integers.
• $n \ge 4$ cannot work because we have established that $x$ cannot be greater than or equal to $\frac{a + b}{2}.$ Solving the inequality $\frac{n - 2}{n}(a + b) \ge \frac{a + b}{2}$, $a + b$ cancels, resulting in $\frac{n - 2}{n} \ge \frac{1}{2} \Rightarrow 2n - 4\ge n \Rightarrow n \ge 4.$ This shows that any $n$ greater than or equal to 4 will not work for $x = \frac{n - 2}{n}(a + b)$ .

Thus, the only possible sets $A$ we have for satisfying the maximum $n_A$, which is 4, are $A = \{p, 5p, 7p, 11p\}$ and $\{p, 11p, 19p, 29p\}$, with $p$ being any positive integer since it is obvious that any $a$ that is a positive multiple of 5 or 11 makes $\frac{a}{5}$ and $\frac{a}{11}$ positive integers, respectively.