Question 7
Let $r$ be the positive root of the equation $x^2 - 2004x - 1 = 0$. Define the sequence $\{a_n\}$ as follows:
$$
a_0 = 1, a_{n+1} = [ra_n], n \ge 0,
$$
where $[y]$ denotes the greatest integer not exceeding $y$. Find the remainder when $a_{2004}$ is divided by $2004$.
$$
a_0 = 1, a_{n+1} = [ra_n], n \ge 0,
$$
where $[y]$ denotes the greatest integer not exceeding $y$. Find the remainder when $a_{2004}$ is divided by $2004$.