I am awakard to deal with math problem

I am trying to understand the first condition that is (k-r)=mN
I can understand when (k-r) is mN, the left formula is 1
But I don't know how to left formular to be right two conditions
I thought that
the left one is going to be (1/N) * (1-e^(j*2*pi*(k-r)))/(1-e^(j*2*pi*(k-r)/N))
- I am curious about the upper formular is right or not.
so I substituted (mN) instead of (k-r) and
I got the result of 1/N, but it is not desirable.
please help me to understand this condition and formula
Thank you for advance
Your calculation, if I read it correctly, is right. However, $$e^{(j)(2\pi)(k-r)}=1,$$ since $k-r$ is an integer.
It follows that the expression $1-e^{(j)(2\pi)(k-r)}$ that we get on top when summing the geometric series is equal to $0$. If $k-r$ is not of the shape $mN$, the result is $0$, since the denominator is non-zero.
If $k-r=mN$, the formula for summing the geometric series does not work, since the denominator is then $1-e^{jm}$, which is $0$. However, in that case the $N$ terms we are summing are all equal to $1$, so the sum is $N$, and when we multiply by the $\frac{1}{N}$ in front, we get $1$.