## Task A-2.7.

Determine the positive rational numbers $x$ and $y$ for which $x+\frac{1}{y}$ and $y+\frac{1}{x}$ are natural numbers.
## First Solution.

Let $a, b, c$, and $d$ be natural numbers such that

$$
x=\frac{a}{b}, \quad y=\frac{c}{d}, \quad \text{GCD}(a, b)=1, \quad \text{GCD}(c, d)=1
$$

From the conditions of the problem, the numbers

$$
\frac{a}{b}+\frac{d}{c}=\frac{a c+b d}{b c} \quad \text{and} \quad \frac{b}{a}+\frac{c}{d}=\frac{b d+a c}{a d}
$$

are natural.

In particular, the number

$$
a \cdot \frac{b d+a c}{a d}=\frac{b d+a c}{d}=b+\frac{a c}{d}
$$

is also natural, so $\frac{a c}{d}$ is natural. Since $c$ and $d$ are relatively prime, $\frac{a}{d}$ must be a natural number.

1 point

Similarly, the number

$$
d \cdot \frac{b d+a c}{a d}-c=\frac{b d+a c}{a}-c=\frac{b d}{a}
$$

is also natural, and since $\text{GCD}(a, b)=1$, $\frac{d}{a}$ is a natural number.

1 point

The only way both $\frac{a}{d}$ and $\frac{d}{a}$ can be natural is if $a=d$.

1 point

Similarly, by considering the numbers $b \cdot \frac{a c+b d}{b c}$ and $c \cdot \frac{a c+b d}{b c}-d$, we get that $b=c$. \quad 1 point

Thus, we have that the numbers $x+\frac{1}{y}=\frac{2 a}{b}$ and $y+\frac{1}{x}=\frac{2 b}{a}$ are natural.

1 point

Since $a$ and $b$ are relatively prime, we get that $a$ and $b$ are divisors of 2, so they must be 1 or 2.

1 point

By checking all cases, we get three solutions for $(x, y)$: $\left(\frac{1}{2}, 2\right), (1,1), \left(2, \frac{1}{2}\right)$.

1 point