Find $x,y,z \in \mathbb Q$ such that $x + \frac 1y, y + \frac 1z, z+ \frac 1x \in \mathbb Z$

Find $x,y,z \in \mathbb Q$ such that: $$x + \frac 1y, y + \frac 1z, z+ \frac 1x \in \mathbb Z$$

Here is my thinking: $$x + \frac 1y, y + \frac 1z, z+ \frac 1x \in \mathbb Z\\ \implies \left ( x + \frac 1y\right ) \left ( y + \frac 1z\right )\left ( z + \frac 1x\right )\in \mathbb Z \\ \iff \frac 1 {xyz} + xyz + \left( x+\frac 1y \right) + \left( y+\frac 1z \right) + \left( z+\frac 1x \right) \in \mathbb Z \\ \iff xyz + \frac 1 {xyz} \in \mathbb Z \\ \iff |xyz| = 1 \text{ (I proved it, easily)}$$

Case 1: $xyz=1 \implies \exists a,b,c \in \mathbb Z$ such that: $x = \frac ab,y=\frac bc,z=\frac ca$

$$\implies \frac {a+c} b = x+\frac 1y \in \mathbb Z$$

and so on.

Now, I am stuck. Do you thing I am going a right way ?


Solution 1:

Let's start with your observation, that $|xyz| = 1$, and therefore $xyz = \pm 1$. If we take any solution $(x, y, z)$ with $xyz = -1$ and change it to $(-x, -y, -z)$, it is still a solution and we have $(-x)(-y)(-z) = 1$, so it's enough to consider the solutions with $xyz = 1$ and obtain the rest by flipping all the signs. So we have $x = \frac{a}b$, $y = \frac{b}c$, and $z = \frac{c}a$ for some integers $a, b, c$. Without loss of generality, let |a| ≤ |b| ≤ |c|. We actually can't make the assumption $|a| \le |b| \le |c|$ without loss of generality! But we can let $c$ be the largest of the three in magnitude, which means that $|c| \ge |b|$ and $|c| \ge |a|$. The other solutions will be obtained by cyclically rotating the three.

Then, consider the fact that (as $y + \frac1z$ is an integer) $c$ divides $(a + b)$ and therefore $|c|$ divides $|a+b|$. As $|a| \le |c|$ and $|b| \le |c|$, we have $|a + b| \le 2|c|$, with equality holding only when $|a| = |c|$ and $|b| = |c|$ (in which case we have the solutions $|x| = |y| = |z| = 1$).

Otherwise, $|a+b|$ is strictly less than $2|c|$, and so either $|a + b| = 0$, or $|a + b| = |c|$.

If $|a + b| = 0$ so that $b = -a$, then the fact that $a$ divides $b+c = c-a$ means that $c$ is a multiple of $a$, say $c = ka$. This is always a solution, and gives $x = \frac{a}{b} = -1$, $y = \frac{b}{c} = \frac{-1}{k}$, and $z = \frac{c}{a} = k$.

The other case is that $|a + b| = |c|$, so $a + b = \pm c$. We can consider these separately as two cases:

  • $a + b = -c$. This happens to be fine for any pair of nonzero integers $(a, b)$, and gives the family of solutions $x = \frac{a}{b}$, $y = \frac{b}{c} = \frac{-b}{a+b}$, and $z = \frac{c}{a} = \frac{-a-b}{a}$.

  • $a + b = c$. In this case, the fact that $b$ divides $(c + a) = 2a + b$ means that $b$ divides $2a$, and similarly the fact that $a$ divides $(b + c) = a + 2b$ means that $a$ divides $2b$. So $|b|$ is one of $|a|/2$, $|a|$, or $2|a|$. Let's consider all three separately, in descending order:

    • If $|b| = 2|a|$, then $b = 2a$ (as $b = -2a$ gives $c = a + b = -a$, which contradicts our assumption that $|c| \ge |b|$). So $c = a + b = 3a$, and this gives the solution $x = \frac{a}{b} = \frac12$, $y = \frac{b}{c} = \frac23$, $z = \frac{c}{a} = 3$.
    • If $|b| = |a|$, then we can ignore the case $b = -a$ as we already considered it earlier, and look at $b = a$. This gives $c = 2a$, and indeed a solution $x = \frac{a}b = 1$, $y = \frac{b}{c} = \frac12$, and $z = \frac{c}{a} = 2$.
    • If $|b| = |a|/2$, then $a = 2b$ (as $a = -2b$ gives $c = a + b = -b$, contradicting our assumption that $|c| \ge |a|$). So $c = a + b = 3b$, and this gives the solution $x = \frac{a}{b} = 2$, $y = \frac{b}{c} = \frac13$, and $z = \frac{c}{a} = \frac32$.

To summarize, all the solutions $(x, y, z)$ are (note that all the below are distinct):

  • $(1, 1, 1)$,
  • $(2, 1, \frac12)$,
  • $(\frac12, \frac23, 3)$,
  • $(-k, -1, \frac1k)$ for any nonzero integer $k$,
  • $(\frac{a}{b}, \frac{-b}{a+b}, \frac{a+b}{-a})$, for any pair of nonzero integers $a$ and $b$,

and the solutions obtained by changing any $(x, y, z)$ above to $(y, z, x)$, $(z, x, y)$, $(-x, -y, -z)$, $(-y, -z, -x)$, or $(-z, -x, -y)$.

Solution 2:

It is most interesting to consider $x>0,y>0,z>0$, because there is a lots of solutions in other case.

A. If $(x,y,z)$ is a solution, then one can construct other solutions: $$\begin{array}{ccc} (x,y,z) & (y,z,x) & (z,x,y) \\ (-x,-y,-z) & (-y,-z-,x) & (-z,-x,-y) \\ (\frac{1}{z},\frac{1}{y},\frac{1}{x}) & (\frac{1}{x},\frac{1}{z},\frac{1}{y}) & (\frac{1}{y},\frac{1}{x},\frac{1}{z}) \\ (-\frac{1}{z},-\frac{1}{y},-\frac{1}{x}) & (-\frac{1}{x},-\frac{1}{z},-\frac{1}{y}) & (-\frac{1}{y},-\frac{1}{x},-\frac{1}{z}). \\ \end{array}\tag{1} $$

B. For each pair $a,b\in \mathbb{N}$, such that $GCD(a,b)=1$, triple

$$ \Bigl(x = \frac{a}{b}, \quad y = -\frac{b}{a+b}, \quad z = -\frac{a+b}{a} \Bigr) \tag{2} $$ is a solution: $x+\frac{1}{y} = -1$, $y+\frac{1}{z} = -1$, $z+\frac{1}{x} = -1$.
Other derived triples (see A.) are solutions too.

C. For each $n \in \mathbb{N}$ triple $$ \Bigl(x = n, \quad y=-1, \quad z = -\frac{1}{n} \Bigr) \tag{3} $$ is a solution: $x+\frac{1}{y} = n-1$, $y+\frac{1}{z} = -n-1$, $z+\frac{1}{x} = 0$.
Other derived triples (see A.) are solutions too.

D. There are other (most interesting for me) solutions:
$\diamond \qquad (1,1,1)\quad$ (and derived modification $(-1,-1,-1)$);
$\diamond \qquad (1, \frac{1}{2}, 2)\quad$ (and modifications);
$\diamond \qquad (\frac{1}{2}, \frac{2}{3}, 3) \quad$ (and modfications).
They have $x,y,z$ all positive (or all negative).

Maybe this list has continuation (?).

Solution 3:

Case 1:

Assume $x=\frac{p}{q}, y=\frac{s}{t}$, where $q, t>0$ and $\gcd(p,q)=\gcd(s, t)=1$. Then we may suppose $a=ps, b=qs, c=tq$.

Since $x+\frac{1}{y}=\frac{p}{q}+\frac{t}{s} \in \mathbb{Z}$, we have $q=\pm s$.

Since $y+\frac{1}{z}=\frac{s}{t}(1+\frac{p}{q})$ and $z+\frac{1}{x}=\frac{q}{p}(1+\frac{t}{s}) \in \mathbb{Z}$, we have $t|p+q$ and $p|s+t$ (using $q=\pm s$).

Case 1.1 If $q=s$, then $q|p+t, t|p+q, p|t+q$,

Case 1.2 If $q=-s$, then $q|p-t, t|p+q, p|t+q$,

Case 2: $x=\frac{q+1}{q}, y=-q, z=\frac{1}{q+1}$ and $x=\frac{q+2}{q}, y=-\frac{q}{2}, z=\frac{1}{q+2}$ are solutions.