<s>[INST] Find all integers n such that $\;\frac{n^2-9}{n^2-5n+4}$ is an integer. 
Find all integers such that $\;\dfrac{n^2-9}{n^2-5n+4}\;$ is an integer.

I am really struggling to figure this out. I can tell that -3,3, and 5 are solutions but I don't know how to show that these are the only solutions or if they even are the only solutions.
 [/INST] The denominator is $(n-1)(n-4)$. If $n^2\ne 9$, we must have that $n-4$ divides $n^2-9$.
Note that $\frac{n^2-9}{n-4}=n+4+\frac{7}{n-4}$. So the only candidates are those $n$ such that $n-4$ divides $7$. That gives the short list $n=5$, $n=3$, $n=11$, and $n=-3$. Test them all.
</s>