Prove that the last digit of $\frac{n(n+1)}{2}$ is never 9

elementary-number-theorynumber theory

The original question was

If the last digit of $\sum_1^n n^3$ is 1, then the last digit of $\sum_1^n n$ is ______?

The sum of the cubes of natural numbers is equal to the square of the sum of the natural numbers. Since the last digit of the sum of cubes is 1, the last digit of the sum of numbers can be either 1 or 9. Substituting n=1..13 in the formula $\frac{n(n+1)}{2}$ gives numbers which end in 1, but never a number ending in 9. The answer key also mentions the answer to be 1, but not 9.

Please conclusively prove why $\sum_1^n n$ can never end with a 9.

Best Answer

We compute all the possible residues $n(n+1)\bmod10$, which are $[0, 2, 6, 2, 0, 0, 2, 6, 2, 0]$. If the last digit of $\frac{n(n+1)}2$ was a $9$, the last digit of $n(n+1)$ would be $8$, but since $8$ does not appear as a possible value of $n(n+1)\bmod10$, $9$ cannot be the last digit of $\frac{n(n+1)}2$.

Related Question