<s>[INST] If the equation $(x^2-4)^3(x^3+1)^n(x^2-5x+6)^m=0$ has 18 roots, find m+n. If the equation $(x^2-4)^3(x^3+1)^n(x^2-5x+6)^m=0$ has 18 roots, find $m+n$.
I did and I got 
$$(x+2)^3(x-2)^{3+m}(x+1)^n(x^2-x+1)^n(x-3)^m=0$$, so I find $3+3+m+n+2n+m=18\implies 2m+3n=12$, the answer is m+n=5. What I have to do now?
 [/INST] $2×3+3×n+2×m = 18$
Find $m+n$
$3*n+2*m = 12$
( Diophantine equation )
Offcourse $m,n € Z$ were $Z → (0,1,2,3,4,5,............)$
If we construct a table, 
Put $n=0$, $m=6$
Put $n=1$, $m$ ≠ $Z$
Put $n=2$, $m=3$
Put $n=3$, $m$ ≠ $Z$
Put $n=4$, $m=0$
So there are only there values that works here $n=0$, $m=6$ and $n=2$, $m=3$ and $n=4$, $m=0$
Therefore $m+n$ is either $6$ or $5$ or $4$
</s>