\(a,\Rightarrow3\left(n+2\right)-7⋮\left(n+2\right)\\ \Rightarrow n+2\inƯ\left(7\right)=\left\{-7;-1;1;7\right\}\\ \Rightarrow n\in\left\{-9;-3;-1;5\right\}\\ b,\Rightarrow\left(n^2+5n-5n-25+23\right)⋮\left(n+5\right)\\ \Rightarrow\left[n\left(n+5\right)-5\left(n+5\right)+23\right]⋮\left(n+5\right)\\ \Rightarrow n+5\inƯ\left(23\right)=\left\{-23;-1;1;23\right\}\\ \Rightarrow n\in\left\{-28;-6;-4;18\right\}\)
Lời giải:
a.
$3n-1\vdots n+2$
$\Rightarrow 3(n+2)-7\vdots n+2$
$\Rightarrow 7\vdots n+2$
$\Rightarrow n+2\in \left\{\pm 1; \pm 7\right\}$
$\Rightarrow n\in\left\{-1; -3; 5; -9\right\}$
b.
$n^2-2\vdots n+5$
$\Rightarrow n(n+5)-5(n+5)+23\vdots n+5$
$\Rightarrow (n+5)(n-5)+23\vdots n+5$
$\Rightarrow 23\vdots n+5$
$\Rightarrow n+5\in\left\{\pm 1;\pm 23\right\}$
$\Rightarrow n\in\left\{-4; -6; 18; -28\right\}$