# Toss the coin 2017 times

There is a biased coin whose probability of getting a head at the $$i^\text{th}$$ flip in a game of 2017 flips be given by $$\sin^2\left(\frac{i\pi}{2017}\right)$$.

If the variance of this probability distribution can be expressed as $$\frac pq$$, where $$p$$ and $$q$$ are coprime positive integers, find $$p+q$$.


Bonus: Generalize this.

×