Đặt \(a\left(a+3\right)=n^2\) (với n nguyên)
\(\Rightarrow a^2+3a=n^2\)
\(\Rightarrow4a^2+12a=4n^2\)
\(\Rightarrow4a^2+12a+9-9=4n^2\)
\(\Rightarrow\left(2a+3\right)^2-9=\left(2n\right)^2\)
\(\Rightarrow\left(2a+3\right)^2-\left(2n\right)^2=9\)
\(\Rightarrow\left(2a+3-2n\right)\left(2a+3+2n\right)=9\)
Ta có bảng sau:
2a+3-2n | -9 | -3 | -1 | 1 | 3 | 9 |
2a+3+2n | -1 | -3 | -9 | 9 | 3 | 1 |
a | -4 | -3 | -4 | 1 | 0 | 1 |
n | 2 | 0 | -2 | 2 | 0 | -2 |
Vậy \(a=\left\{-4;-3;0;1\right\}\)