If $S_n = 1+ 2 +3 + \cdots + n$, then prove that the last digit of $S_n$ is not 2,4 7,9. 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$.

Note that $1+2+3+4+5$ is divisible by $5$, and for the same reason $5k+1+5k+2+5k+3+5k+4+5k+5$ is divisible by $5$ for any integer $k$.
Let $5m$ be the largest multiple of $5$ which is $\le n$. Then $n=5m$ or $n=5m+1$ or $n=5m+2$ or $n=5m+3$ or $n=5m+4$.
The sum of the integers from $1$ to $5m$ is divisible by $5$. So when we sum from $1$ to $n$, the remainder on division by $5$ is $0$, or $1$, or $1+2$, or the remainder when $1+2+3$ is divided by $5$, or the remainder when $1+2+3+4$ is divided by $5$. So the possibilities are $0$, $1$, $3$, $1$, and $0$. In particular, the remainders cannot be $2$ or $4$. So the last digit cannot be $2$, $7$, $4$, or $9$.
