As part of a task given to me, I need to find a value/expression for the below sum:
$$\sum_{a=0}^{2N} e^{\frac{i \pi a^2}{2N}}$$
I've tried plugging it into python but isn't the nicest thing and I've also tried it in Wolfram but it will only tell me that it converges as $N\to \infty$.
Any help would be greatly appreciated.