ĐK:a\(\ge0,a\ne1\)
Ta có \(B=\dfrac{\sqrt{a}+1}{\sqrt{a}-1}=\dfrac{\sqrt{a}-1+2}{\sqrt{a}-1}=1+\dfrac{2}{\sqrt{a}-1}\)
Vậy để B nguyên thì \(\dfrac{2}{\sqrt{a}-1}\in Z\Rightarrow\sqrt{a}-1\inƯ\left(2\right)\in\left\{\pm1,\pm2\right\}\)\(\Rightarrow\left[{}\begin{matrix}\sqrt{a}-1=1\\\sqrt{a}-1=-1\\\sqrt{a}-1=2\\\sqrt{a}-1=-2\end{matrix}\right.\)\(\Rightarrow\left[{}\begin{matrix}\sqrt{a}=2\left(n\right)\\\sqrt{a}=0\left(n\right)\\\sqrt{a}=3\left(n\right)\\\sqrt{a}=-1\left(l\right)\end{matrix}\right.\)\(\Rightarrow\left[{}\begin{matrix}a=4\left(tm\right)\\a=0\left(tm\right)\\a=9\left(tm\right)\end{matrix}\right.\)
Vậy khi a=4,a=0,a=9 thì B có giá trị nguyên