Difference between revisions of "1992 OIM Problems/Problem 1"

(See also)
 
(5 intermediate revisions by the same user not shown)
Line 12: Line 12:
 
<math>a_{20k+p}=\frac{(20k+p)(20k+p+1)}{2}\text{ mod } 10</math>  
 
<math>a_{20k+p}=\frac{(20k+p)(20k+p+1)}{2}\text{ mod } 10</math>  
  
<math>a_{20k+p}=\frac{20k^2+20k(p+1)+20kp+p(p+1)}{2}\text{ mod } 10</math>  
+
<math>a_{20k+p}=\frac{400k^2+20k(p+1)+20kp+p(p+1)}{2}\text{ mod } 10</math>  
  
<math>a_{20k+p}=\frac{20k^2+20k(p+1)+20kp+p(p+1)}{2}\text{ mod } 10</math>  
+
<math>a_{20k+p}=\left(10(20k^2+k(p+1)+kp)+ \frac{p(p+1)}{2} \right)\text{ mod } 10</math>  
  
<math>a_{20k+p}=\left(10(k^2+k(p+1)+kp)+ \frac{p(p+1)}{2} \right)\text{ mod } 10</math>
+
Since <math>10(20k^2+k(p+1)+kp)\text{ mod } 10=0</math>, then
 
 
Since <math>10(k^2+k(p+1)+kp)\text{ mod } 10=0</math>, then
 
  
 
<math>a_{20k+p}=\frac{p(p+1)}{2} \text{ mod } 10 = a_p</math>  
 
<math>a_{20k+p}=\frac{p(p+1)}{2} \text{ mod } 10 = a_p</math>  
Line 57: Line 55:
 
Hence, <math>S_{20k+p}=70k+\sum_{i=1}^{p}a_i</math>
 
Hence, <math>S_{20k+p}=70k+\sum_{i=1}^{p}a_i</math>
  
<math>S_{1992}=S{(20)(99)+12}=(70)(99)+\sum_{i=1}^{12}a_i=6930+\sum_{i=1}^{12}a_i</math>
+
<math>S_{1992}=S_{(20)(99)+12}=(70)(99)+\sum_{i=1}^{12}a_i=6930+\sum_{i=1}^{12}a_i</math>
  
 
Using the table above we calculate: <math>\sum_{i=1}^{12}a_i=54</math>
 
Using the table above we calculate: <math>\sum_{i=1}^{12}a_i=54</math>
Line 65: Line 63:
 
Hence, <math>a_1 + a_2 + a_3 + \cdots + a_{1992}=6984</math>
 
Hence, <math>a_1 + a_2 + a_3 + \cdots + a_{1992}=6984</math>
  
 +
* Note.  I actually competed at this event in Venezuela when I was in High School representing Puerto Rico.  Although I did get the correct answer, I was only given 8 out of 10 points because I didn't prove that the pattern repeats every 20 numbers.  I simply listed the calculations for the first 23 to 26 <math>a_n</math>'s and realized that the pattern repeated.  Without proof I proceeded to calculate 20 times 99 plus the summation from <math>a_1</math> through <math>a_{12}</math> and despite getting the correct numerical answer, I was not awarded the full points for not sufficient proof.  At the competition showing that the pattern repeats every 20 by induction was not sufficient proof.  Whatever you claim, even if it is obvious, it needs to be proven.  I submitted such proof on this page. 
  
 +
~Tomas Diaz. orders@tomasdiaz.com
  
 
{{alternate solutions}}
 
{{alternate solutions}}
 +
== See also ==
 +
[[OIM Problems and Solutions]]
  
== See also ==
 
 
https://www.oma.org.ar/enunciados/ibe7.htm
 
https://www.oma.org.ar/enunciados/ibe7.htm

Latest revision as of 08:43, 23 December 2023

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{400k^2+20k(p+1)+20kp+p(p+1)}{2}\text{ mod } 10$

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

Since $10(20k^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$

Since $a_{20k+p}=a_p$

then, $S_{20k+p}=k\sum_{i=1}^{20}a_i+\sum_{i=1}^{p}a_i$

Now we calculate $a_1$ through $a_{20}$:

$\begin{cases} a_{1}=\frac{(1)(2)}{2}\text{ mod }10=1\text{ mod }10=1\\ a_{2}=\frac{(2)(3)}{2}\text{ mod }10=3\text{ mod }10=3\\ a_{3}=\frac{(3)(4)}{2}\text{ mod }10=6\text{ mod }10=6\\ a_{4}=\frac{(4)(5)}{2}\text{ mod }10=10\text{ mod }10=0\\ a_{5}=\frac{(5)(6)}{2}\text{ mod }10=15\text{ mod }10=5\\ a_{6}=\frac{(6)(7)}{2}\text{ mod }10=21\text{ mod }10=1\\ a_{7}=\frac{(7)(8)}{2}\text{ mod }10=28\text{ mod }10=8\\ a_{8}=\frac{(8)(9)}{2}\text{ mod }10=36\text{ mod }10=6\\ a_{9}=\frac{(9)(10)}{2}\text{ mod }10=45\text{ mod }10=5\\ a_{10}=\frac{(10)(11)}{2}\text{ mod }10=55\text{ mod }10=5\\ a_{11}=\frac{(11)(12)}{2}\text{ mod }10=66\text{ mod }10=6\\ a_{12}=\frac{(12)(13)}{2}\text{ mod }10=78\text{ mod }10=8\\ a_{13}=\frac{(13)(14)}{2}\text{ mod }10=91\text{ mod }10=1\\ a_{14}=\frac{(14)(15)}{2}\text{ mod }10=105\text{ mod }10=5\\ a_{15}=\frac{(15)(16)}{2}\text{ mod }10=120\text{ mod }10=0\\ a_{16}=\frac{(16)(17)}{2}\text{ mod }10=136\text{ mod }10=6\\ a_{17}=\frac{(17)(18)}{2}\text{ mod }10=153\text{ mod }10=3\\ a_{18}=\frac{(18)(19)}{2}\text{ mod }10=171\text{ mod }10=1\\ a_{19}=\frac{(19)(20)}{2}\text{ mod }10=190\text{ mod }10=0\\ a_{20}=\frac{(20)(21)}{2}\text{ mod }10=210\text{ mod }10=0 \end{cases}$

Using the table above we calculate: $\sum_{i=1}^{20}a_i=70$,

Hence, $S_{20k+p}=70k+\sum_{i=1}^{p}a_i$

$S_{1992}=S_{(20)(99)+12}=(70)(99)+\sum_{i=1}^{12}a_i=6930+\sum_{i=1}^{12}a_i$

Using the table above we calculate: $\sum_{i=1}^{12}a_i=54$

Therefore, $S_{1992}=6930+54=6984$

Hence, $a_1 + a_2 + a_3 + \cdots + a_{1992}=6984$

  • Note. I actually competed at this event in Venezuela when I was in High School representing Puerto Rico. Although I did get the correct answer, I was only given 8 out of 10 points because I didn't prove that the pattern repeats every 20 numbers. I simply listed the calculations for the first 23 to 26 $a_n$'s and realized that the pattern repeated. Without proof I proceeded to calculate 20 times 99 plus the summation from $a_1$ through $a_{12}$ and despite getting the correct numerical answer, I was not awarded the full points for not sufficient proof. At the competition showing that the pattern repeats every 20 by induction was not sufficient proof. Whatever you claim, even if it is obvious, it needs to be proven. I submitted such proof on this page.

~Tomas Diaz. orders@tomasdiaz.com

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

See also

OIM Problems and Solutions

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