I am trying to come up with a solution to $$\sum_{k=0}^{2020}\cos\left(\frac{2\pi k}{2021}\right) $$ so far I have proceeded as to acknowledge the cosine is just the real part of the Euler's formula form: $$ \sum_{k=0}^{2020}\cos\left(\frac{2\pi k}{2021}\right)=\textrm{Re}\left(\sum_{k=0}^{2020}e^{2\pi ik/2021}\right) $$ and so, rephrasing since it is basically a geometrical series (for all k>1): $$\sum_{k=0}^{2020}e^{2\pi ik/2021}=\frac{1-e^{2021(2\pi i)/2021}}{1-e^{2\pi ik/2021}} $$ now, simplifying $$ {e^{2021(2\pi i)/2021}} = {e^{2\pi i}} $$ and using, that $$e^{2\pi i}=\cos\left(2\pi\right)+i\sin\left(2\pi\right)=1 $$ the result will be $$\sum_{k=0}^{2020}e^{2\pi ik/2021}=\frac{1-1}{1-e^{2\pi ik/2021}} = \frac{0}{1-e^{2\pi ik/2021}}= 0 $$
Did I happen to make a mistake anywhere, or should this be correct? I have seen other people solve this problem with the formula for sine and cosine sums in arithmetic progression, however, I am not allowed to use that formula since it was never introduced in our course.
Any help would be very appreciated :)