<s>[INST] How to solve $\lfloor x \rfloor + \lfloor \frac{1}{x} \rfloor = 1$? I am stuck with this equation. All I could do is this:
$\lfloor x \rfloor$ = $\lfloor n + m \rfloor$ such that $n \in N$ and $m<1$.
We get:
$\lfloor x \rfloor + \lfloor \frac{1}{x} \rfloor = 1$
$\lfloor n + m \rfloor + \lfloor \frac{1}{n+m} \rfloor = 1$
$n + \lfloor m \rfloor + \lfloor \frac{1}{n+m} \rfloor = 1$
$n + 0 + \lfloor \frac{1}{n+m} \rfloor = 1$
$n + \lfloor \frac{1}{n+m} \rfloor = 1$
From here on I have no idea what to do!
Edit: It is easy to see that any value $1<x<2$ satisfies the equation, but can I find all the solutions?
 [/INST] We can rule out $x<0$. If $x\geqslant 2$, then $1-\lfloor x \rfloor \leqslant -1$, which is problematic. If $x\leqslant 1/2$, then $\lfloor \frac{1}{x} \rfloor = 1-\lfloor x \rfloor$ is again impossible. For any $x\in (1/2, 2)\setminus \{1\}$ we have
$$ \left\lfloor x \right\rfloor + \left\lfloor\frac{1}{x} \right\rfloor =1. $$
</s>