a)\(P\in Z\Leftrightarrow\frac{5}{\sqrt{n}-1}\in Z\Leftrightarrow5⋮\sqrt{n}-1\Leftrightarrow\sqrt{n}-1\inƯ\left(5\right)\Leftrightarrow\sqrt{n}-1\in\left(1;5;\left(-1\right);\left(-5\right)\right)\)
\(\Leftrightarrow\left\{\begin{matrix}\sqrt{n}=2\\\sqrt{n}=6\\\sqrt{n}=0\\\sqrt{n}=-4\left(voli'\right)\end{matrix}\right.\Rightarrow\left\{\begin{matrix}n=4\\n=36\\n=0\end{matrix}\right.\)
Vậy P có giá trị nguyên \(\Leftrightarrow n\in\left(4;36;0\right)\)
b)\(P=\frac{3n+2}{n+1}=\frac{3n+3-1}{n+1}=3-\frac{1}{n+1}\)
\(P\in Z\Leftrightarrow3-\frac{1}{n+1}\in Z\Leftrightarrow1⋮n+1\Leftrightarrow n+1\inƯ\left(1\right)\Leftrightarrow n+1\in\left(1;\left(-1\right)\right)\)
\(\Rightarrow\left\{\begin{matrix}n+1=1\\n+1=\left(-1\right)\end{matrix}\right.\Rightarrow\left\{\begin{matrix}n=1-1=0\\n=-1-1=-2\end{matrix}\right.\)
Vậy P có giá trị nguyên \(\Leftrightarrow n\in\left(0;-2\right)\)