I have been trying to evaluate $\sum_{i=1}^{125} i^4\pmod {125}$. My attempt has been somewhat like this so far:
We know that 125 has a primitive root. Let's call it $r$. Now we know that $$r,r^2,\ldots, r^{\phi(125)}$$ is actually congruent to the set of positive integers that are less than 125 and relatively prime to it, i.e. all the numbers not divisible by 5. Also note that $\phi(125)=100$. Thus I write the sum as follows: $$\sum_{i=1}^{125} i^4=(5^4+10^4+15^4+\ldots + 125 ^4)+(1+2^4+3^4+\ldots+124^4)$$ $$=5^4(1+2^4+3^4+\ldots+25^4)+(1+r^4+r^8+\ldots+r^{396})$$ $$\equiv \frac{r^{400}-1}{r^4-1}\pmod {125}$$ $$\equiv 0\pmod {125}$$
But when I calculate the expression using wolphram alpha, I get the answer is 100. Where am I going wrong? Please point out. Thanks in advance.