1992 OIM Problems/Problem 1

Revision as of 00:29, 14 December 2023 by Tomasdiaz (talk | contribs)

Problem

For each positive integer $n$, let $a_n$ be the last digit of the number. $1+2+3+\cdots +n$. Calculate $a_1 + a_2 + a_3 + \cdots + a_{1992}$.

~translated into English by Tomas Diaz. ~orders@tomasdiaz.com

Solution

$a_n=\frac{n(n+1)}{2}\text{ mod } 10$

Let $k$ and $p$ be integers with $k \ge 0$, and $1 \le p \le 20$

$a_{20k+p}=\frac{(20k+p)(20k+p+1)}{2}\text{ mod } 10$

$a_{20k+p}=\frac{20k^2+20k(p+1)+20kp+p(p+1)}{2}\text{ mod } 10$

$a_{20k+p}=\frac{20k^2+20k(p+1)+20kp+p(p+1)}{2}\text{ mod } 10$

$a_{20k+p}=\left(10(k^2+k(p+1)+kp)+ \frac{p(p+1)}{2} \right)\text{ mod } 10$

Since $10(k^2+k(p+1)+kp)\text{ mod } 10=0$, then

$a_{20k+p}=\frac{p(p+1)}{2} \text{ mod } 10 = a_p$


Let $S_n=a_1 + a_2 + a_3 + \cdots + a_n$


Alternate solutions are always welcome. If you have a different, elegant solution to this problem, please add it to this page.

See also

https://www.oma.org.ar/enunciados/ibe7.htm