Ta có:
\(P=\dfrac{2n-4+3}{n-2}\)
\(P=2+\dfrac{3}{n-2}\)
Dể P nguyên thì \(\dfrac{3}{n-2}\)nguyên hay \(n-2\inƯ\left(3\right)\)
\(Ư\left(3\right)\in\left\{-3;-1;1;3\right\}\)
Ta có bảng:
n-2 | -3 | -1 | 1 | 3 |
n | -1 | 1 | 3 | 5 |
Vậy n\(\in\left\{-1;1;3;5\right\}\)
Để P nhận giá trị nguyên
thì \(2n-1⋮n-2\)
\(\Rightarrow2n-4+3⋮n-2\)
\(\Rightarrow2n-2.2⋮n-2\)
\(\Rightarrow2.\left(n-2\right)+3⋮n-2\)
mà \(2.\left(n-2\right)⋮n-2\)
\(\Rightarrow3⋮n-2\)
\(\Rightarrow n-2\inƯ\left(3\right)\)
\(\Rightarrow n-2\in\left\{1;-1;3;-3\right\}\)
\(\Rightarrow n\in\left\{3;1;5;-1\right\}\)
Ta có:\(P=\dfrac{2n-1}{n-2}=\dfrac{2n-4+3}{n-2}=\dfrac{2\left(n-2\right)+3}{n-2}=2+\dfrac{3}{n-2}\)Để P có gt nguyên thì \(2+\dfrac{3}{n-2}\) là số nguyên
Hay\(\dfrac{3}{n-2}\)nguyên\(\Rightarrow3⋮n-2\)
\(\Rightarrow n-2\inƯ\left(3\right)=\left\{1;3;-1;-3\right\}\)
\(\Rightarrow n-2\in\left\{1;3;-1;-3\right\}\)
\(\Rightarrow n\in\left\{3;5;1;-1\right\}\)
Vậy tìm được giá trị \(n\in\left\{3;5;1;-1\right\}\)