Can I find an integer solution to this equation? I have an equation that looks like:
$$m =\frac{17+n}{15-2n}$$
$n$ is an integer. Is it possible for me to find an integer value of $m$ in an equation of this form, without brute forcing $n=1,2...$ ? In the above example, the solution is $m=3$ (or $m=24$, but that's if the denominator=$1$).
 A: Note that $m$ is an integer iff $15-2n$ is a divisor of $17+n$. Now, $15 -2n \mid 17+n$ if and only if $$15-2n \mid 2(17+n)+(15-2n) = 49$$ (note that $15-2n$ is odd). So we find an integral value of $m$ if and only if $15-2n$ is one of the divisors $-49$, $-7$, $-1$, $1$, $7$ or $49$ of $49$. This corresponds to $n$ being equal to one of $32$, $11$, $8$, $7$, $4$ or $-17$, with $m$ being equal to $-1$, $-4$, $-25$, $24$, $3$ or $0$. 
The full solution set is
$$
(m,n) \in \{ (-25,8), (-4,11), (-1,32), (0,-17), (3,4), (24,7) \}.
$$
A: If you divide out the fraction, you get
$$\frac{17+n}{15-2n}=-\frac12+\frac{49/2}{15-2n}=-\frac12+\frac12\cdot\frac{49}{15-2n}=\frac12\left(\frac{49}{15-2n}-1\right)\;.$$
This is an integer if and only if $\dfrac{49}{15-2n}$ is an odd integer. Since all divisors of $49$ are odd, we need only look for the integers $n$ that make $\dfrac{49}{15-2n}$ an integer, i.e., those that make $15-2n$ a divisor of $49$. The divisors of $49$ are $\pm1,\pm7$, and $\pm49$, so there are six solutions: just solve the equations $15-2n=d$ for $d\in\{-49,-7,-1,1,7,49\}$ to get the six values of $n$.
