Sigma notation using Modulo

951 Views Asked by At

I've come across a step in a proof in a book on number theory that doesn't make sense to me:

$$\sum_{n(mod\,p)}\frac{n(n-1)(n+1)}{p}$$ $$=\sum_{n(mod\,p)}\frac{(n+1)(n)(n+2)}{p}$$

As I understand it, using notation like $n(mod\;p)$ as a sigma range should be equivalent to:

$$\sum_{n=0}^{p-1}\frac{n(n-1)(n+1)}{p}$$

But, assuming this, the second line above doesn't seem to follow.

Am I misinterpreting the notation or is there something subtler going on here?