Find all integers such that $\frac{n^3-3}{n^2-7}$ is an integer Find all integers such that $\frac{n^3-3}{n^2-7}$ is an integer.
I have no idea how to approach these types of proofs.
But I tried a few things, did not get me anywhere.
$n^3 -3 = an^2-7a$ then $n^3-an^2 = 3-7a$, and hence $n^2(n-a) = 3-7a$
And then I have no where to go...
Any help is appreciated thanks.
 A: Hint $\rm\ \ n^2\!-\color{#0A0}7\mid n^3\!-\color{#C00}3\ \Rightarrow\ mod\,\ n^2\!-7\!:\,\ \color{#0A0}7^3\! = n^6 = \color{#C00}3^2\:\Rightarrow\: n^2\!-7\mid 7^3\!-3^2 =\, 2\cdot 167\ $ 
$\rm\,2,\,167\,$ are prime so, by unique factorization, $\rm\:n^2\!-7\mid\, 2\cdot 167\,$ $\Rightarrow$  $\rm\, n^2\!-7 = \pm\{1, 2,167, 334\},\,$ so $\ldots$ 
A: Note that
$$
\frac{n^3-3}{n^2-7} = n + \frac{7n-3}{n^2-7}.
$$
So it suffices to determine when $n^2-7$ divides $7n-3$. It is not hard to show that $|n^2-7| > |7n-3|$ when $|n|>8$; so for those $n$, it is impossible for $n^2-7$ to divide $7n-3$. That leaves only the cases $n=-8,-7,\dots,8$ to check, revealing the two solutions $n=-3$ and $n=3$.
A: If  $d|(n^3-3)$ and $d|(n^2-7)\implies d|\{n(n^2-7)-(n^3-3)\}\implies d|(3-7n)$
Again as $d|(n^2-7)$ and $d|(3-7n)\implies d|\{7(n^2-7)+n(3-7n)\}\implies d|(3n-49)$
Again as $d|(3n-49)$ and $d|(3-7n)\implies d|\{-3(3-7n)-7(3n-49)\}\implies d|334$
The rest is what precisely "Math Gems" has done.
So, $(n^2-7)|334$
Now, the factor$(F)$s of $334=2\cdot167$ are $\pm(1,2,167,334)$
Now, test for the integral solution of $n^2-7=F$
