Problem

Source: Albania JTST 2015

Tags:



For every positive integer $n{}$ denote $a_n$ as the last digit of the sum of the number from $1$ to $n{}$. For example $a_5=5, a_6=1.$ a) Find $a_{21}.$ b) Compute the sum $a_1+a_2+\ldots+a_{2015}.$