For every positive integer $n{}$ denote $a_n$ as the last digit of the sum of the number from $1$ to $n{}$. For example $a_5=5, a_6=1.$ a) Find $a_{21}.$ b) Compute the sum $a_1+a_2+\ldots+a_{2015}.$
Problem
Source: Albania JTST 2015
Tags:
04.03.2024 17:05
We see that $a_n\equiv n(n+1)/2\pmod{10}$. So if $k\equiv j\pmod{10}$ that implies $a_k=a_j$ so $a_1+...+a_{2015}=202(a_1+a_2+a_3+a_4+a_5)+201(a_6+a_7+a_8+a_9+a_{10})=202(15)+201(25)=8055$
31.03.2024 09:12
$a_n\equiv n*(n+1)/2 (mod 10)$ So, $a) a_{21}=21*22/2\equiv 1(mod 10)$ And also for variant b, we can group numbers such as for $x=\equiv k(mod 10)$ $a_k\equiv a_x$ Till 2015 there are $a_{2015},...,a_{2010}.$ We must add them to this sum. Let's solve; $[2015/10]=201$ $201*(a_1+a_2+a_3+a_4+a_5)+201*(a_6+a_7+a_8+a_9+a_10)+(a_1+a_2+a_3+a_4+a_5)\equiv 5+5+5 \equiv 5(mod 10)$
10.11.2024 23:13
$1)a_{21}=\frac{21 \times 22}{2}=231$ so the answer is $1$ $2)Claim:a_i=a_i+20k$ for some integer $k$ Proof:$\frac{(20k+a)(20k+a+1)}{2}=\frac{400k^2+40ak+20k+a(a+1)}{2}\equiv\frac{a(a+1)}{2}\hspace{1mm}(mod\hspace{1mm}10)$ Also,one can calculate that $a_1+a_2+...+a_{20}=0$ So $a_1+a_2+...+a_2015=a_1+a_2+...+a_15=0\hspace{1mm}(mod\hspace{1mm}10)$ Also, if $x\equiv j\hspace{1mm}(mod\hspace{1mm}10)$, then $a_x=a_j$ is wrong, take $x=3$ and $j=13$ for example $a_x=6$ but $a_j=1$
28.12.2024 12:41
a) $a_n=\sum_{k=1}^nk \pmod{10} = \dfrac{n(n+1)}{2}\pmod{10} \implies a_{21}=\dfrac{21(22)}{2}\pmod{10}=231\pmod{10}=\boxed{1}.$ b) For $n=10k, a_n = \dfrac{10k(10k+1)}{2}\pmod{10}=5k = 0,5 \pmod{10}.$ Similarly, $n=10k+4, 10k+5, 10k+9 \implies a_n = 0,5$, $n=10k+1, 10k+3, 10k+6, 10k+8 \implies a_n=1,6$, $n=10k+2, 10k+7 \implies a_n=3,8$. Note that $a_n$ always has $2$ possible values depending on whether $k$ is odd or even. Therefore, $\sum_{i=1}^{2015}a_i=\sum_{k=0}^{201}(a_{10k}+a_{10k+1}+\dots+a_{10k+5})+\sum_{k=0}^{200}(a_{10k+6}+a_{10k+7}+\dots+a_{10k+9})$ $=101((0+5)+(1+6)+(3+8)+(1+6)+(0+5)+(0+5))+100((1+6)+(3+8)+(1+6)+(0+5))+1+8+6+5=\boxed{7060}.$
12.01.2025 18:33
for part a: $a_{21}=21*11\equiv 1*1 \equiv 1(mod 10)$ for part b: $a_1+a_2+......a_{2015}=1+(1+2)+......(1+2+......2015)=1 *2015 +2*2014 +3*2013 +..... 2015*1\\ \sum^{2014}_{i=0}(i+1)(2015-i)\\=\sum^{2014}_{i=0}(2015i+2015-i^2-i)\\ =2015*1012*2015+2015*2014-1012*2015*1343-1012*2015\\\equiv5*2*5+5*4-2*5*3-2*5\\\equiv 0 (mod 10)$