Đặt: \(a^2+a-1=k^2\left(k\in N\right)\)
\(\Rightarrow4a^2+4a-4=4k^2\)
\(\Rightarrow4a^2+2a+2a+1-5=4k^2\)
\(\Rightarrow2a\left(2a+1\right)+\left(2a+1\right)-5=\left(2k\right)^2\)
\(\Rightarrow\left(2a+1\right)\left(2a+1\right)-5=\left(2k\right)^2\)
\(\Rightarrow\left(2a+1\right)^2-\left(2k\right)^2=5\) ( * )
Ta sẽ chứng minh: \(a^2-b^2=\left(a-b\right)\left(a+b\right)\)
Thật vậy, ta có:
\(a^2-b^2=a^2-ab+ab-b^2=a\left(a-b\right)+b\left(a-b\right)=\left(a-b\right)\left(a+b\right)\)\(\RightarrowĐpcm\)
Áp dụng vào ( * ), ta có:
\(\left(2a+1-2k\right).\left(2a+1+2k\right)=5\)
Vì \(a,k\in N\) nên \(2a+1-2k;2a+1+2k\in N\) và \(2a+1-2k\le2a+1+2k\)
\(\Rightarrow2a+1-2k,2a+1+2k\inƯ\left(5\right)\)
\(\Rightarrow2a+1-2k=1\) và \(2a+1+2k=5\)
\(\Rightarrow2a+1=2k+1\) và \(2k+1=-2k+5\Rightarrow4k=4\Rightarrow k=1\)
\(\Rightarrow2a+1=2.1+1=3\Rightarrow a=1\)
Vậy \(a=1\)