<s>[INST] How can I find all integers $x≠3$ such that $x−3|x^3−3$ How can I find all integers $x≠3$ such that $x−3|x^3−3$?
I tried expand $x^3−3$ as a sum but I couldn't find a way after that.
 [/INST] $$x - 3 | x^3 - 3$$
$$\frac{x^3 - 3}{x - 3} = \frac{x^3 - 3 + 27 - 27}{x - 3}$$
$$ = \frac{x^3 - 27 + 24}{x - 3}$$
$$ = \frac{x^3 - 3^3 + 24}{x - 3}$$
$$ = \frac{(x - 3) \times (x^2 + 3x + 9) + 24}{x - 3}$$
$$ = x^2 + 3x + 9 + \frac{24}{x - 3}$$
The result is integer when $x - 3$ is a factor of $24$ and $x \ne 3$
</s>