I hope you're all doing well.
I'm trying to prove the following identity: $$\frac{1}{N} \sum_{j=1}^{N} e^ {\frac{2i\pi(n-n')j}{N}} = \delta_{nn'}$$
but I'm having some troubles.
This is what I tried:
We know that for a finite geometric series, the entire sum is equal to $$\sum_{j=1}^{N} ar^{bj} = \frac{ar^b(r^{bN} - 1)}{r^b - 1}$$
In your case we have: $$r = e$$ $$a = \frac{1}{N}$$ $$b = \frac{2i\pi(n-n')}{N}$$
Using this I found
$$\frac{1}{N} \sum_{j=1}^{N} e^ {\frac{2i\pi(n-n')j}{N}} = \frac{1}{N} \frac{e^{\frac{2i\pi(n-n')}{N}}(e^{{2i\pi(n-n')}} - 1)}{e^{\frac{2i\pi(n-n')}{N}} - 1}$$
but after this I'm not able to see how these exponentials are gonna to result in the Kronecker's delta.
Be careful with $\delta_{nn'}$: your formula is true if $n, n'$ are either regarded as integers modulo $n$ or restricted to set $\{ 1,...,N \}$. Can you see why the value of the sum is unchanged if $n$ or $n'$ is shifted by an integer multiple of $N$?
Take the formula you derived. In the numerator you have $e^{2 \pi i (n-n')}-1=1-1=0$. This is not quite right if $n-n'$ is divisible by $N$ because then also denominator vanishes. In fact in this special case your formula is wrong, because geometric series formula is valid only if the ratio of consecutive terms of the series is not equal $1$. So in this special case you have to compute the sum in a different way.