Can sum of a rational number and its reciprocal be an integer?

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.


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\,$.

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.