Algebra Level 5

This problem is from OMO.

For reals $$x \ge 3$$, let $$f(x)$$ denote the function $$f(x) = \frac{-x + x\sqrt{4x - 3}}{2}$$. Suppose $$a_1, a_2, ..., a_{2013}$$ is a sequence of real numbers such that $$a_1 > 3$$, $$a_{2013} = 2013$$, and for $$n = 1, 2, ..., 2012$$, $$a_{n + 1} = f(a_n)$$. Determine the value of $$a_1 + \displaystyle\sum_{i = 1}^{2012}\frac{a_{i + 1}^3}{a_i^2 + a_ia_{i + 1} + a_{i + 1}^2}$$

×