<s>[INST] If $a+\frac{1}{b}, b+\frac{1}{c}, c+\frac{1}{a}\in\mathbb{Z}$, find $a+b+c$. Let $a,b,c$ be positive rational numbers such that 
$a+\frac{1}{b}, b+\frac{1}{c}, c+\frac{1}{a}$
are all integers.
Find all the possible values of $a+b+c$.
it would be too complicate to solve by quadratic equation(the discriminant is 6 degree polynomial of 3 variables...). 
Either, no thought at all…
 [/INST] Ok I worked it out 
$$a+b+c=3, \frac{7}{2} ,\frac{25}{6}, \frac{23}{6}$$
Assume $$\frac{x}{y}+\frac{z}{w}=\frac{xw+yz}{yw}$$
 is an integer with both fractions in reduced form,
then $y|w$ and $w|y$ so $y=w$ (they are positive).
This means that 
$a,b,c$ must be of the form 
$$\frac{p}{q}, \frac{q}{r}, \frac{r}{p}$$ respectively.
where $p,q,r$ are relatively prime in pairs.
Let us assume that $p\leq q \leq r$.
If $r=1$ then all are one and $a+b+c=3$.
So assume $r>1$ then $r|p+q$ and $p+q \leq 2r$ so either
$p+q=r$ or $p+q=2r$.
Taking the first possiblity, 
we see that $p|2q$ and $q|2p$ now since they are relatively prime, $p=1,2$ and $q=1,2$
If $p=q=1$ we have 
$$1, \frac{1}{2}, 2$$ and 
$$a+b+c=\frac{7}{2}$$
If $p=1, q=2$ we have 
$$\frac{1}{2}, \frac{2}{3}, 3$$ and 
$$a+b+c=\frac{25}{6}$$
If $p=q=2$ then we get a previous case.
Now assume that 
$p+q=2r$,
then $2p|3q+p$ and $2q|3p+q$ so $p=1,3$ and $q=1,3$
If $p=q=1$ then $r=1$ and we have  previous case. 
If $p=1$, $q=3$ then $r=2$
 and 
$$\frac{1}{3}, \frac{3}{2}, 2$$
 and $$a+b+c =\frac{23}{6}$$
 If $p=q=3$ we have a previous case. 
This gives the values stated at the beginning.
</s>