Find $x$ such that $\sum_{k=1}^{2014} k^k \equiv x \pmod {10}$ Find $x$ such that $$\sum_{k=1}^{2014} k^k \equiv x \pmod {10}$$

I knew the answer was $3$.

Hint: You can work directly modulo $10$, or modulo $5$, since the sum modulo $2$ is clear.
The value of $a^b$ modulo $p$, for fixed $b$, cycles nicely.  By Fermat's Theorem, or Euler's Theorem, there is also nice cycling for fixed $a$ and variable $b$. Putting these things together, you should be able to detect and prove cycling in the value of $k^k$ modulo $5$ or $10$. 
