
1. Find all quadruples $(a, b, c, d)$ of positive integers satisfying $\operatorname{gcd}(a, b, c, d)=1$ and

$$
a|b+c, \quad b| c+d, \quad c|d+a, \quad d| a+b .
$$

Vítězslav Kala (Czech Republic)


Solution. Without loss of generality, assume that $a=\max \{a, b, c, d\}$. Then

$$
a \leq b+c \leq 2 a \text {, }
$$

and so we have 2 possible cases:

CASE 1. $b+c=2 a$.

In this case, $a=b=c$, and so

$$
a=c \mid(d+a)-a=d \text {. }
$$

But $a \geq d$, and so we must have $a=b=c=d$, and by the coprimality assumption, we get the solution $(1,1,1,1)$.

CASE 2. $b+c=a$.

Let $c+d=k b$ for some positive integer $k$. The relation $c \mid d+a$ then implies

$$
c \mid c+d+(b+c)=(k+1) b+c,
$$

and so $(k+1) b=l c$ for some positive integer $l$.

Moreover, we have

$$
d \mid a+b=2 b+c
$$

and so $m d=m(k b-c)=2 b+c$ for some positive integer $m$.

We now have the system

$$
\begin{aligned}
(k+1) b & =l c \\
(k m-2) b & =(m+1) c .
\end{aligned}
$$

From the second equation, we see that $k m-2>0$, and so

$$
l=(k+1) \frac{b}{c}=\frac{(k+1)(m+1)}{k m-2}=1+\frac{k+m+3}{k m-2} .
$$

Since $l$ is an integer, we have

$$
k m-2 \mid k+m+3 .
$$

However, if $(k-1)(m-1)>6$, then $k m-2>k+m+3$, which would contradict $k m-2 \mid k+m+3$.

Note that $m=1$ is not possible, for then we would have $d=2 b+c>b+c=a$. Therefore, there are 5 remaining cases.

CASE 2a. $k=1$.

Then $m-2 \mid m+4$, and so $m-2 \mid 6$, i.e. $m$ is one of the numbers $3,4,5,8$ (recall that we know that $m-2=k m-2>0)$. The corresponding values of $l$ are then $8,5,4,3$. By the coprimality assumption, this uniquely determines the solutions as

$$
(a, b, c, d) \in\{(5,4,1,3),(7,5,2,3),(3,2,1,1),(5,3,2,1)\}
$$

CASE $2 \mathrm{~b} . k=2$ for $2 \leq m \leq 7$.

We then have $2 m-2 \mid m+5$, and so the only possibilities are $(m, l) \in\{(3,3),(7,2)\}$, to which the corresponding solutions are

$$
(a, b, c, d) \in\{(2,1,1,1),(5,2,3,1)\} .
$$

CASE 2c. $m=2$ for $3 \leq k \leq 7$.

Then $2 k-2 \mid k+5$, and so the only possibilities are $(k, l) \in\{(3,3),(7,2)\}$ and so

$$
(a, b, c, d) \in\{(7,3,4,5),(5,1,4,3)\}
$$

CASE 2d. $k=3$ for $3 \leq m \leq 4$.

Then $3 m-2 \mid m+6$. The only possibility is $m=4$, and so $l=2$ and

$$
(a, b, c, d)=(3,1,2,1) \text {. }
$$

CASE 2e. $k=4$ and $m=3$.

Here, we get $l=2$ and

$$
(a, b, c, d)=(7,2,5,3)
$$

Altogether, we have found the following solutions:

$$
\begin{gathered}
(a, b, c, d) \in\{(7,5,2,3),(7,3,4,5),(7,2,5,3),(5,4,1,3),(5,3,2,1), \\
(5,2,3,1),(5,1,4,3),(3,2,1,1),(3,1,2,1),(2,1,1,1),(1,1,1,1)\}
\end{gathered}
$$

(and all their rotations when we remove the assumption that $a$ is largest).

Alternative solution. We will show a different finish of case 2 from the previous solution. we need to fulfill

$$
b|c+d, \quad c| d+b, \quad d \mid 2 b+c
$$

We will distinguish cases based on which of the numbers $b, c, d$ is largest.

CASE 2a. $b=\max (b, c, d)$.

Then $b=(c+d) / 2$ or $b=c+d$ by the same reasoning as in in case 1 . The first statement yields $b=c=d$, which gives $(a, b, c, d)=(2,1,1,1)$ when combined with the coprimality condition.

If, on the other hand, $b=c+d$ holds, then the conditions above ensure $c \mid 2 d$ and $d \mid 3 c$, thus $c|2 d| 6 c$, so that $2 d \in\{c, 2 c, 3 c, 6 c\}$. Each of these possibilities determines $a$ and $b$ uniquely by the coprimality condition. We arrive at the solutions

$$
(a, b, c, d) \in\{(3,2,1,1),(5,3,2,1),(5,4,1,3),(7,5,2,3)\} .
$$

CASE 2b. $c=\max (b, c, d)$.

By the same reasoning as in case $2 \mathrm{a}$, we get

$$
(a, b, c, d) \in\{(2,1,1,1),(5,2,3,1),(5,1,4,3),(7,2,5,3),(3,1,2,1)\} .
$$

CASE 2c. $d=\max (b, c, d)$.

Because of $b+c=a \geq d \geq(2 b+c) / 3$, we can only have $d \mid 2 b+c$ for $d=(2 b+c) / 2$ or $d=(2 b+c) / 3$. Again, the latter case yields $b=c=d$ and the solution $(2,1,1,1)$.

For $d=(2 b+c) / 2=b+c / 2$, we find that $c$ has to be even, and so $c=2 C$ for a positive integer $C$. Now, we obtain $b \mid c+d=2 C+(b+C)$, which means $b \mid 3 C$, as well as $C|c| d+b=(b+C)+b$, and therefore $C \mid 2 b$. We infer $b|3 C| 6 b$ and from that $3 C \in\{b, 2 b, 3 b, 6 b\}$. Only $3 C=2 b$ yields a new solution, specifically $(7,3,4,5)$.
