Determine if the expression is an integer. I'm tryin to solve this:
Determine $k$ such that $\frac{k^2-87}{3k+117}$ is an integer. 
I think chinese remainder theorem will be useful, but i don't see how.
 A: Clearly, $3$ needs to divide  $k\implies k=3a$(say)
$$\implies \frac{k^2-87}{3k+117}=\frac{(3a)^2-87}{3(3a)+117}=\frac{3a^2-29}{3(a+13)}=a-13+\frac{478}{3(a+13)}$$
Observe that $478$ is not divisible by $3$ unlike the denominator 
So, there is no solution is integers 
A: Since $3k+117=3(k+39)$, $k^2-87$ must be a multiple of $3$. $87=3\cdot29$, so $k^2$ must be a multiple of $3$, which means that $k=3\ell$ for some integer $\ell$. Then
$$\frac{k^2-87}{3k+117}=\frac{9\ell^2-3\cdot29}{3(3\ell+39)}=\frac{3\ell^2-29}{3\ell+39}=\frac{3\ell^2-29}{3(\ell+13)}\;;$$
can that ever be an integer?
A: If integer $d$ divides $k^2-87$ and $3k+117,$
$d$ must divide $k(3k+117)-3(k^2-87)=9(13k+29)$
So, $9$ must divide $k^2-87\iff k^2\equiv87\pmod 9\equiv6$
But, $(\pm1)^2\equiv1, (\pm2)^2\equiv4, (\pm3)^2\equiv 0, (\pm4)^2\equiv7\pmod 9 \implies k^2\not\equiv6\pmod 9$
A: By using MAPLE, we can probe the case machinery. Just give the software the following code:
 for k from 0 to 2^20 do msolve(k^2-87 = 0, 3*k+117) od;

You will get nothing. Note  that  it takes time to see the result since $2^{20}$ may be a considerable number for our computers.
