Find the rightmost digit of: $1^n+2^n+3^n+4^n+5^n+6^n+7^n+8^n+9^n$ Find the rightmost digit of: $1^n+2^n+3^n+4^n+5^n+6^n+7^n+8^n+9^n(n$ arbitrary positive integer)
First of all I checked a few cases for small $n$'s and in all cases the rightmost digit was $5$, so maybe this is the case for all values of $n$.
Then I thought maybe it's better to consider odd and even cases for $n$ but there's no unified rule here, because for example: $8^2\equiv{4}\pmod{10}$ and  $8^4\equiv{6}\pmod{10}$. Any ideas??

Modulo $10$ easy inductions show that
$$\begin{align*}
&1^n+9^n\equiv\begin{cases}
0,&\text{if }n\text{ is odd}\\
2,&\text{if }n\text{ is even}\;,
\end{cases}\\
&2^n+8^n\equiv\begin{cases}
0,&\text{if }n\text{ is odd}\\
8,&\text{if }n\equiv 2\pmod4\\
2,&\text{if }n\equiv 4\pmod4\;,
\end{cases}\\
&3^n+7^n\equiv\begin{cases}
0,&\text{if }n\text{ is odd}\\
8,&\text{if }n\equiv 2\pmod4\\
2,&\text{if }n\equiv 0\pmod4\;,
\end{cases}\\
&4^n+6^n\equiv\begin{cases}
0,&\text{if }n\text{ is odd}\\
2,&\text{if }n\text{ is even}\;,\text{ and}
\end{cases}\\
&5^n\equiv 5\;.
\end{align*}$$
Thus, 
$$\sum_{k=1}^9k^n\equiv\begin{cases}
5,&\text{if }n\not\equiv0\pmod4\\
3,&\text{if }n\equiv 0\pmod4\;.
\end{cases}$$
And as a quick check of the second case above,
$$\sum_{k=1}^9k^4=1+16+81+256+625+1296+2401+4096+6561=15,333\;.$$
Note that the stated result is true only when $n$ is not a multiple of $4$.
