sum 1/(cos a - cos ((2k+1)a)) for k = 1 to n