Gọi ƯCLN(3n+1;n-2) là \(a\left(a\in Z\right)\)
ta có :\(\left(3n+1\right)⋮a\\ \left(n-2\right)⋮a\\ \Rightarrow\left[3\left(n-2\right)-\left(3n+1\right)\right]⋮a\\ \rightarrow\left[\left(3n+6\right)-\left(3n+1\right)\right]⋮a\\ \rightarrow\left[3n-6-3n-1\right]⋮a\\ \rightarrow\left(-6-1\right)⋮a\\ \rightarrow-7⋮a\\ \Rightarrow a=\text{Ư}\left(-7\right)=\left\{\pm1;\pm7\right\}\)
ta có bảng sau :
n-2 | 1 | -1 | 7 | -7 |
n | 3 | 1 | 9 | -5 |
Vậy:\(n\in\left\{3;1;9;-5\right\}\)