Question 3For $n\ge1$, define $a_n=1000+n^2$. Find the greatest possible value of $\gcd(a_n,a_{n+1})$.