(1)
 
(2)
 
(3)

where
(4)

has been used. Similarly,
(5)
 
(6)
 
(7)

By looking at the real and imaginary parts of these formulas, sums involving sines and cosines can be obtained.
(1)
 
(2)
 
(3)

where
(4)

has been used. Similarly,
(5)
 
(6)
 
(7)

By looking at the real and imaginary parts of these formulas, sums involving sines and cosines can be obtained.
Weisstein, Eric W. "Exponential Sum Formulas." From MathWorldA Wolfram Web Resource. https://mathworld.wolfram.com/ExponentialSumFormulas.html