It seems like you are asking for a rational number $n$ with the property that $$n+\frac{1}{n}$$ is an integer. Let $z$ be an integer. Then we have $$n+\frac{1}{n}=z$$ and $$n^2+1=zn$$ $$n^2-zn+1=0$$ and by the quadratic formula, $$n=\frac{z\pm\sqrt{z^2-4}}{2}$$ And so $z$ must be an integer, and $z^2-4$ must be a perfect square. This can only happen when $z=\pm2$, so we have $$n=\frac{\pm2\pm\sqrt{2^2-4}}{2}$$ $$n=\frac{\pm2}{2}$$ $$n=\pm 1$$ Looks like you've found the only solutions!


Let $\frac{m}{n}+\frac{n}{m}=k$, where $\gcd(m,n)=1$ and $\{m,n,k\}\subset \mathbb N$.

Thus, $m^2+n^2=kmn$, which gives that $m^2$ divisible by $n$ and $n^2$ divisible by $m$.

Try to end it now.


Key Idea $\ r\ \&\ 1/r\,$ have integer sum & product so by RRT both are integers, so $\,r =\pm1.\,$

For convenience we reproduce the proof below, slightly generalized to $\,r\ \&\ c/r$.

Lemma $ $ If $\ r\in \Bbb Q,\,c\in\Bbb Z\ $ then $\ r + c/r = b\in\Bbb Z \iff r,\, c/r \in \Bbb Z\,\ $ [OP is $\,c \!=\! 1\Rightarrow r=\pm1 ]$

Proof $\ (\overset{\times\ r}\Longrightarrow)\,\ \ r^2 +c = b\, r \,\overset{\rm\small RRT}\Rightarrow\,r\in \Bbb Z\,$ $\,\Rightarrow\,r\mid c\,$ by $ $ RRT = Rational Root Test. $\,\ (\Leftarrow)\ $ Clear.


Remark $ $ More generally if $\ a\, r + c/r = b\ $ for $\,a,b,c\in\Bbb Z\,$ then scaling by $\,a\,$ we deduce as above $\ a\,r^2 - b\,r + c = 0\,$ so RRT $\Rightarrow\, r = e/d,\ \gcd(e,d)=1,\ e\mid c,\ d\mid a.\,$ If $\,a,c\,$ have $\rm\color{#c00}{few}$ factors then only a $\rm\color{#c00}{few}$ possibilities exist for $\,r,\,$ e.g. if $\,a,c\,$ are primes then $\,\pm r = 1,\, c,\,1/a,\,$ or $\,c/a\,$. [Equivalently $\,ar\ \&\ c/r\,$ have integer sum & product so are integers so $\,ar = ae/d\in\Bbb Z\Rightarrow d\mid a,\,$ and $\,c/r = cd/e\Rightarrow e\mid c,\,$ by $\,d,e\,$ coprime and Euclid's Lemma].

These are special cases of ideas going back to Kronecker, Schubert and others which relate the possible factorizations of a polynomial to the factorizations of its values. In fact we can devise a simple (but inefficient) polynomial factorization algorithm using these ideas. For more on this viewpoint see this answer and its links.


Suppose $\frac pq+\frac qp =n$ then $p^2+q^2=pqn$ for integers $p,q,n$. As a quadratic in $p$ this is $p^2-qnp+q^2=0$ so that $$p=\frac {qn\pm \sqrt {q^2n^2-4q^2}}{2}$$ so that for the square root to yield an integer we require $n^2-4=m^2$ for some integer $m$. The only two integer squares which differ by $4$ are $0$ and $4$, so $n=\pm 2$ and the only solutions are $p=\pm q$.


This is equivalent to the quadratic formula solutions, but I like it a little better.

Suppose that $r=\frac{a}{b}$, and $r+\frac{1}{r}=\frac{a}{b} + \frac{b}{a} = k$ is an integer. We can rewrite this equation as $a^2 + b^2 = kab$, and multiplying by $4$ completing the square gives us: $$(2a-kb)^2 = (k^2 - 4)b^2$$

For this equation to hold, $k^2 - 4$ must be a square. The squares are $0,1,4,9,\ldots$ with growing consecutive differences, so this is only possible if $k^2=4$, or $k=\pm 2$.

Finally, this gives us $(2a-kb)^2 = 0$, or $a=\pm b$. In other words, $r=\pm 1$.