Originally Posted by

**Pinkk** What is the value of $\displaystyle 1+2+...+(p-1) \equiv (mod p)$? $\displaystyle 1^{2} + 2^{2} + ... + (p-1)^{2} \equiv (mod p)$? For any positive integer k, find the value of $\displaystyle 1^{k} + 2^{k} + ... + (p-1)^{k} \equiv (mod p)$ and prove your assertion is correct?

So I simply tested out values, and for a lot of primes and powers, it's simply 0, but sometimes, when $\displaystyle p=3$, for example, it's sometimes either 0 or 2, like when $\displaystyle k=10$ it's 2, but when $\displaystyle k=11$, it's 0. I can't come up with a clear formula for any of these values.