# Integer Division Solutions

How do you solve this question:

For how many integers $x$ is $(x + 49)/(x − 16)$ an integer?

Should I set this expression equal to something and then solve? Please explain how I should solve this problem.

• Did you try doing that and seeing what happened? If it had worked, you wouldn't even have needed to ask this question. – Qiaochu Yuan Jan 23 '16 at 22:58
• @QiaochuYuan I did try doing that and it didn't lead me anywhere. I was wondering if someone else had the same idea and if I had done something wrong when trying to find a solution. – Ayush Jan 23 '16 at 23:00
• Try thinking in the descomposition of $x$. – YTS Jan 23 '16 at 23:11
• I don't see how this is trivial, but it is a finite problem. If $x>81$ then the fraction is $<2$, hence non-integral. I'd just look at all the cases. – lulu Jan 23 '16 at 23:24
• @lulu It's just all of the factors, both positive and negative, of $49+16=65$ minus $16$. These problems are trivial, but only once you get to know them. I'll explain more in a full answer. – Noble Mushtak Jan 23 '16 at 23:26

## 1 Answer

First, rewrite this as $\frac{y+65}{y}$ where $y=x-16$. Having just $y$ in the denominator will make this much easier.

Basically, we need to find all of the integers $y$ such that $y+65=ky$ for some $k \in \mathbb{N}$. We can rewrite this as $(1-k)y=65$. Notice that this means that $y$ is a factor of $65$. Thus, this expression is an integer if and only if $y$ is a factor of $65$, or when $y \in \{ -65, -13, -5, -1, 1, 5, 13, 65 \}$.

However, $y=x-16$, or $x=y+16$. Therefore, we need to increase all of our $y$s by 16. Thus, $x \in \{ -49, 3, 11, 15, 17, 21, 29, 81 \}$. Thus, the number of solutions is $8$.

• (+1) Thanks for this. Clever device. These days, if I get to something that can be programmed instantly, I stop looking. Bad habit. – lulu Jan 23 '16 at 23:35
• Programming can be really helpful for solving some problems like on Project Euler, but I think on Math StackExchange, most of the problems can be done by hand. – Noble Mushtak Jan 23 '16 at 23:39