2 Answer the following two questions and justify your answers:
(1) What is the last digit of the sum $1^{2012}+2^{2012}+3^{2012}+4^{2012}+5^{2012}$ ?
(2) What is the last digit of the sum $1^{2012}+2^{2012}+3^{2012}+4^{2012}+\cdots+2011^{2012}+2012^{2012}$ ?
Solution: The final digit of a power of $k$ depends only on the final digit of $k$, so there are 10 cases to consider. These are easy to work out. For $k$ ending in 1 , the final digits are $1,1,1,1, \ldots$. For $k$ ending in 2 they are $2,4,8,6,2,4,8,6, \ldots$, et cetera. In fact all 10 possible final digits repeat after 1,2 or 4 steps, so in every case the final digit is back where it started every 4 steps. Since 2012 is divisible by 4 , the last digit of $k^{2012}$ is the same as the last digit of $k^{4}$. As $k$ varies, the last digits of $k^{4}$ go through a cycle of length $10: 1,6,1,6,5,6,1,6,1,0$.
For part (1), if we list the last digits of the five summands, we have $1,6,1,6,5$, whose sum has a last digit of 9 .
For part (2), if we list the last digits of the 2012 summands, we will have 201 copies of the sequence $1,6,1,6,5,6,1,6,1,0$, followed by 1 and 6 . Since $1+6+1+6+5+6+1+6+1+0=33$, the last digit of the original sum is the same as the last digit of $201 \cdot 33+1+6$, which is 0 .