Giải:
Để \(P\in Z\Rightarrow2n-1⋮n-1\)
Ta có: \(2n-1⋮n-1\)
\(\Rightarrow\left(2n-2\right)+1⋮n-1\)
\(\Rightarrow2\left(n-1\right)+1⋮n-1\)
\(\Rightarrow1⋮n-1\)
\(\Rightarrow n-1\in\left\{1;-1\right\}\)
+) \(n-1=1\Rightarrow n=2\)
+) \(n-1=-1\Rightarrow n=0\)
Vậy \(n\in\left\{2;0\right\}\)