Ta có:\(n^2+2n-6=n^2-4n+6n-24+18\)
\(=n\left(n-4\right)+6\left(n-4\right)+18\)
\(=\left(n+6\right)\left(n-4\right)+18\)
Để \(\left(n^2+2n-6\right)⋮\left(n-4\right)\) thì \(18⋮\left(n-4\right)\)
\(\Rightarrow n-4\inƯ\left(18\right)=\left\{-18,-9,-6,-3,-2,-1,1,2,3,6,9,18\right\}\)
\(\Rightarrow n\in\left\{-14,-5,-2,1,2,3,5,6,7,10,13,22\right\}\)
.Vì x là số tự nhiên nên \(x\in\left\{1,2,3,5,6,7,10,13,22\right\}\) thỏa mãn