a) \(n^2+n-17⋮n+5\)
\(\Leftrightarrow n\left(n+5\right)-\left(4n+17\right)⋮n+5\)
Mà \(n\left(n+5\right)⋮n+5\)
\(\Rightarrow4n+17⋮n+5\)
\(\Rightarrow4\left(n+5\right)-3⋮n+5\)
mà \(4\left(n+5\right)⋮n+5\)
\(\Rightarrow3⋮n+5\)
\(\Rightarrow n+5\inƯ\left(3\right)=\left\{\pm1;\pm3\right\}\)
Lamf noots
b)\(n^2+3n-5⋮n-2\)
\(\Leftrightarrow n^2+2n+n-5⋮n-2\)
\(\Leftrightarrow n\left(n+2\right)+\left(n-2\right)-3⋮n-2\)
Vì \(\hept{\begin{cases}n\left(n-2\right)⋮n-2\\\left(n-2\right)⋮\left(n-2\right)\end{cases}}\)nên \(3⋮n-2\)
\(\Leftrightarrow n-2\inƯ\left(3\right)=\left\{\pm1;\pm3\right\}\)
Lập bảng:
\(n\) | \(1\) | \(-1\) | \(3\) | \(-3\) |
\(n-2\) | \(3\) | \(1\) | \(5\) | \(-1\) |
Vậy \(n\in\left\{3;1;5;-1\right\}\)