Question 95
A sequence $\{a_n\}$ of real numbers is defined by $a_1=1$ and for all integers $n \geq 1$,
$$
a_{n+1}=\frac{a_n \sqrt{n^2+n}}{\sqrt{n^2+n+2 a_n^2}}
$$
Compute the sum of all positive integers $n\lt 1000$ for which $a_n$ is a rational number.
$$
a_{n+1}=\frac{a_n \sqrt{n^2+n}}{\sqrt{n^2+n+2 a_n^2}}
$$
Compute the sum of all positive integers $n\lt 1000$ for which $a_n$ is a rational number.