Let p be prime, such that p doesn't divide a.
Show if p doesn't divide d then
We're given that the sum as 0 (mod p) if p-1 doesn't divide k and is = p-1 if p-1 divides k.
My prof also gave the hint that using euler's criterion will let us use the identity given, but i don't see it
Again sorry about the bad notation, i'm still figuring out LaTeX