Sum of cos(2nt)