How many pairs of numbers are there so they are the inverse of each other and they have the same decimal part?

So we want values of $0<x<1$ such that $x+k= \frac{\large 1}{\large x}$ for positive integer $k$, meaning $x^2+kx-1 =0$. This has a positive solution in the range for every $k$.


There is a pair for every $n \in N$ \begin{eqnarray*} x_{\pm} = \frac{n \pm \sqrt{n^2+4}}{2} \end{eqnarray*}

whence \begin{eqnarray*} 1/(x_{\pm}) = \frac{-n \pm \sqrt{n^2+4}}{2} = x_{\pm}-n \end{eqnarray*}

Eg $n=2$ ... $x_+=2.414 \cdots$ & $x_-=0.414 \cdots$.


Note that $x$ and $\frac1x$ always have the same sign. Also if $\lvert x\rvert > 1,$ then $0 < \left\lvert\frac1x\right\rvert < 1$ and vice versa.

So the pairs will always be two positive numbers as solved in the other answers, or two negative numbers which you can get from one of those solutions just by changing the signs of both numbers; and the general form of two positive numbers $x$ and $\frac1x$ that have the same decimal part is that of the two numbers $$ \frac12\left(n + \sqrt{n^2+4}\right) \quad \text{and} \quad \frac12\left(-n + \sqrt{n^2+4}\right) $$ where $n$ is any non-negative integer.

For $n = 0$ both forms come out to $1$; for $n=1$ they come out to $\phi$ and $\frac1\phi.$

There are exactly a countable number of such pairs, since from each non-negative integer we get at most four pairs. (The exact number of pairs for each value of $n$ depends on how you count them: do you consider "$\phi,\frac1\phi$" the same pair as "$\frac1\phi,\phi$" or different?)

Since $n^2 + 4$ is not a perfect square for any value of $n > 0,$ it follows that $\sqrt{n^2+4}$ is not an integer for $n > 0,$ and a further result is that $\sqrt{n^2+4}$ is irrational whenever $n>0.$ The only rational numbers whose multiplicative inverse have the same fractional part are therefore $1$ and $-1.$