# Sines and Sums and Squares

**Algebra**Level 5

Let \(\{a_i\}_{i=1}^{2014}\) be a sequence of \(2014\) angles satisfying \(0\le a_i \le \dfrac{\pi}{2}\) for all \(i=1\to 2014\). Let the number of ordered \(2014\)-tuplets of solutions to the equation

\[\sum_{cyc}\sin^2(a_1+a_2)=\sum_{cyc}(\sin a_1+\sin a_2)(\cos a_1+\cos a_2)\]

be \(N\). What is the last \(3\) digits of \(N\)?

\[\quad\] \(\text{Details and Assumptions}\)

\(\displaystyle\sum_{cyc}\) denotes the *cyclic sum*. For example,

\[\sum_{cyc}a_1a_2=a_1a_2+a_2a_3+\cdots +a_{n-1}a_n+a_na_1\]