Problem

Source: China Girls Mathematical Olympiad 2009, Problem 8

Tags: floor function, induction, modular arithmetic, continued fraction, Diophantine equation, number theory, Pell equations



For a positive integer $ n,$ $ a_{n}=n\sqrt{5}- \lfloor n\sqrt{5}\rfloor$. Compute the maximum value and the minimum value of $ a_{1},a_{2},\ldots ,a_{2009}.$