\(\frac{a^2-2}{ab+2}\in Z\Rightarrow a^2-2⋮ab+2\)
\(\Rightarrow b\left(a^2-2\right)⋮ab+2\Rightarrow\left[a\left(ab+2\right)-2\left(a+b\right)\right]⋮ab+2\)
\(\Rightarrow2\left(a+b\right)⋮ab+2\)
Đặt \(\frac{2\left(a+b\right)}{ab+2}=k\in Z\Rightarrow2\left(a+b\right)=k\left(ab+2\right)\)
- Nếu \(k\ge2\Rightarrow k\left(ab+2\right)\ge2\left(ab+2\right)\)
\(\Rightarrow2\left(a+b\right)\ge2\left(ab+2\right)\Rightarrow a+b\ge ab+2\)
\(\Rightarrow ab-a-b+1+1\le0\Rightarrow\left(a-1\right)\left(b-1\right)+1\le0\) (vô lý)
Vậy \(k< 2\Rightarrow k=1\Rightarrow2\left(a+b\right)=ab+2\)
\(\Rightarrow ab-2a-2b+4=2\)
\(\Leftrightarrow\left(a-2\right)\left(b-2\right)=2\)
Đến đây bạn tự giải, pt ước số cơ bản