# Inspired by Pi Han Goh!

$\large{a_n = n^2 + 500 \quad ; \quad d_n = \gcd(a_n, \ a_{n+1})}$

For integers $$n \geq 1$$, define $$a_n$$ and $$d_n$$ as above. Determine the largest possible value of $$d_n$$.

×