<s>[INST] The Diophantine Equation: $x^3-3=k(x-3)$ I wish to know how to resolve the diophantine equation: $x^3-3=k(x-3)$ ? The problem is:

Find all integers $x\ne3$ such that $x-3\mid x^3-3$.
- From 250 Problem's in Elementary Number Theory, by W. Sierpinski

I have found the solutions to this problem by using rules in divisibility of numbers, as below:
$$x-3\mid x-3 \Rightarrow x-3\mid x^3 - 3x^2$$
$$x-3\mid x^3-3 \quad and \quad x-3 \mid x^3-3x^2$$
Thus, $x-3$ divides their difference:
$$\Rightarrow x-3\mid 3x^2-3  $$ 
On the other hand:
$$x-3\mid x-3 \Rightarrow x-3 \mid 3x^2-9x$$
Hence their difference is divisible by $x-3$:
$$\Rightarrow x-3\mid 9x-3 \quad and \quad x-3\mid 9x-27$$
$$\Rightarrow x-3\mid 24 \Rightarrow 24=k(x-3)\Rightarrow x=\frac{24}{k}+3$$
So we have the general solution to find the integer values of $x$. But I did not manage to solve the diophantine equation related to the problem: $$x^3-3=k(x-3)$$
Any hints and helps about this equation?  
-Thank you in advance.
 [/INST] You made a mistake at the beginning. $(x^3-3)-(x^3-3x^2)=3x^2-3$, not just  $3x^2$. Thus, you have $(x-3) \mid (9x-3)$ by subtracting from $3x^2-9x$ and then $(x-3) \mid 24$ by subtracting from $9x-27$.
Here is the set of all of the integer divisors of 24:
$$\{-24, -12, -8, -6, -4, -3, -2, -1, 0, 1, 2, 3, 4, 6, 8, 12, 24\}$$
This is the set of all possible $x-3$. Therefore, we can add all of the numbers by $3$ to get the set of all possible $x$. Thus, the following is the solution set:
$$\{-21, -9, -5, -3, -1, 0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 15, 27\}$$
</s>