If $S_n = 1 + 2 + 3 + \cdots + n,$ then prove that the last digit of $S_n$ cannot be 2, 4, 7, or 9 for any whole number n.
What I have done:
*I have determined that it is supposed to be done with mathematical induction.
*The formula for an finite sum is $\frac{1}{2}n(n+1)$.
*This means that since we know that $n(n+1)$ has a factor of two, it must always end in 4 and 8.
*Knowing this, we can assume that $n(n+1)\bmod 10 \neq 4$ or $n(n+1)\bmod 10 \neq 8$.
Hint
$n^2+n \in \{ 0, 2 \} \pmod 4$ $n^2+n \in \{ 0, 1, 2 \} \pmod 5$
By CRT we have only $6$ possible values modulo 20:
$$n^2+n \in \{ 0, 10, 16, 6, 2, 12 \} \pmod {20}$$