Let p be a prime number.
What is the value of 1 + 2 + 3 +......+(p-1) (mod p)
How would I begin to work this problem?
There is another way: $\displaystyle 1+2+...+(p-1) = p\cdot \tfrac{p-1}{2} $, if $\displaystyle p$ is odd.
And so this is a multiple of $\displaystyle p$ thus it reduces to $\displaystyle 0$ mod $\displaystyle p$.
If $\displaystyle p$ is even then it reduces to $\displaystyle 1$.
Try a harder problem: find $\displaystyle 1^k+2^k+...+(p-1)^k (\bmod p)$ where $\displaystyle k$ is positive integer.