# Proving an expression is an integer (number theory) [duplicate]

Suppose that $r$ is a real number such that $r + \frac{1}{r}$ is an integer. Prove that $r^{2017} + \frac{1}{r^{2017}}$ is an integer.

I thought of using prove by induction, but I don't think it really suits in this case. I've also thought of using modulos in some kind of way but not sure how. Also, can we assume that both $r^{2017}$ and $\frac{1}{r^{2017}}$ are both integers, since adding them make up an integer?

## marked as duplicate by Ross Millikan number-theory StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Mar 29 '18 at 2:16

• "can we assume that two numbers are both integers, since their sum is an integer?" no, 1/2 + 1/2 is an integer, but neither summand is. – ziggurism Mar 29 '18 at 2:13
• Another duplicate is here – Ross Millikan Mar 29 '18 at 2:17
• sorry about that. didn't realize this question have been asked. – Stupid Wannabe Mathematician Mar 29 '18 at 2:26

$(r+1/r)^2=r^2+1/r^2+2$ implies that $r^2+1/r^2$ is an integer.
Assume $r^k+1/r^k$ is integer for all $k<n$.
Then $(r+1/r)^n=r^n+1/r^n+\binom{n}{1}(r^{n-2}+1/r^{n-2})+\binom{n}{2}(r^{n-4}+1/r^{n-4})+...$. Therefore, $r^n+1/r^n$ is an integer.
If $r + 1/r = m$, then $r$ and $1/r$ are both roots of the quadratic $x^2 - m x + 1$. Then $a_n = c r^n + d/r^n$ satisfies the recursion $a_{n+2} - m a_{n+1} + a_n = 0$ for any constants $c$ and $d$, in particular for $c=d=1$.