<s>[INST] Simple number theory problem I found this question in a textbook on number theory:

For which integer c will $\;\displaystyle{\frac{c^6 - 3}{c^2 + 2}}\;$ also be an integer?

I wonder if there is a solution which is not based on trial and error.
 [/INST] If $(c^6 - 3)/(c^2 + 2)$ is an integer, then so is $$\frac{c^6 - 3}{c^2 + 2} - (c^4 - 2c^2 + 4) = \frac{c^6 - 3}{c^2 + 2} - \frac{c^6 + 8}{c^2 + 2} = \frac{-11}{c^2 + 2},$$ that is, $c^2 + 2$ divides $11$. The only way this can happen is if $c^2 = 9$, so $c = \pm 3$.
</s>