<s>[INST] solutions of the equation $x^3-y^3=z!-18$ What are the solutions of the equation $x^3-y^3=z!-18$? Here $x,y,z$ are non-negative integers. I have tried brute force but is there a better method?
 [/INST] We can write equation in this form: $(x-y)^3+3xy(x-y)=z!-18$.
For $z\leq 2$:
If $x$ and $y$ give different residues modulo 3, then $z\in \{0,1,2\}$ (otherwise LS would be 1 or 2 modulo 3 and RS would be divisible by 3). 
It can be easily check that only solution is $z=2$, $x=-2$, $y=2$.
For $z\geq 3$:
From previous part, we have $3|(x-y)$. Therefore, $9|z!$, so it must be $z\geq 6$. 
Also, since $9|x^3-y^3$, we have $3|x-y$ and $27|x^3-y^3$. 
For $z\geq 9$, we have $18=y^3-x^3+z!$ which is not possible, since LS is not divisible by 27 and RS is divisible by 27. Therefore, only left solutions are from set $z\in\{6,7,8\}$.
For $z=6$ solutions are $x=-3$, $y=-9$ and $x=9$, $y=3$. Checking other solutions for $z\in\{6,7,8\}$ is left to reader.
</s>