Sum of last digits of a sum
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
Let $d_n$ be the last digit of $S_n$ where $S_n = left(1 + 2 + 3 + .... + nright)$. Find the remainder when $sum_i=1^2017d_i$ is divided by 1000.
My attempt : I found the following
$$S_1 =1 , d_1 =1
\S_2 =3 , d_2 =3
\S_3 =6 , d_3 =6
\S_4 =10 , d_4 =0
\S_5 =15 , d_5 =5
\S_6 =21 , d_6 =1
\S_7 =28 , d_7 =8
\S_8 =36 , d_8 =6
\S_9 =45 , d_9 =5
\S_10 =55 , d_10 =5
$$
I was expecting to get a sequence, but did not find any. Please help me to solve this question.
sequences-and-series summation divisibility
add a comment |Â
up vote
3
down vote
favorite
Let $d_n$ be the last digit of $S_n$ where $S_n = left(1 + 2 + 3 + .... + nright)$. Find the remainder when $sum_i=1^2017d_i$ is divided by 1000.
My attempt : I found the following
$$S_1 =1 , d_1 =1
\S_2 =3 , d_2 =3
\S_3 =6 , d_3 =6
\S_4 =10 , d_4 =0
\S_5 =15 , d_5 =5
\S_6 =21 , d_6 =1
\S_7 =28 , d_7 =8
\S_8 =36 , d_8 =6
\S_9 =45 , d_9 =5
\S_10 =55 , d_10 =5
$$
I was expecting to get a sequence, but did not find any. Please help me to solve this question.
sequences-and-series summation divisibility
Finding the last digit of $S_n$ is the same as calculating $S_n mod 10$, and $d_1 mod 10 + d_2 mod 10 = (d_1+d_2) mod 10$. Does that help?
– postmortes
Jul 31 at 6:52
1
I believe $sum^nd_i$ is tabulated at oeis.org/A111072 and for $n=2017$ the table in the link at that page gives 7069.
– Gerry Myerson
Jul 31 at 7:19
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
Let $d_n$ be the last digit of $S_n$ where $S_n = left(1 + 2 + 3 + .... + nright)$. Find the remainder when $sum_i=1^2017d_i$ is divided by 1000.
My attempt : I found the following
$$S_1 =1 , d_1 =1
\S_2 =3 , d_2 =3
\S_3 =6 , d_3 =6
\S_4 =10 , d_4 =0
\S_5 =15 , d_5 =5
\S_6 =21 , d_6 =1
\S_7 =28 , d_7 =8
\S_8 =36 , d_8 =6
\S_9 =45 , d_9 =5
\S_10 =55 , d_10 =5
$$
I was expecting to get a sequence, but did not find any. Please help me to solve this question.
sequences-and-series summation divisibility
Let $d_n$ be the last digit of $S_n$ where $S_n = left(1 + 2 + 3 + .... + nright)$. Find the remainder when $sum_i=1^2017d_i$ is divided by 1000.
My attempt : I found the following
$$S_1 =1 , d_1 =1
\S_2 =3 , d_2 =3
\S_3 =6 , d_3 =6
\S_4 =10 , d_4 =0
\S_5 =15 , d_5 =5
\S_6 =21 , d_6 =1
\S_7 =28 , d_7 =8
\S_8 =36 , d_8 =6
\S_9 =45 , d_9 =5
\S_10 =55 , d_10 =5
$$
I was expecting to get a sequence, but did not find any. Please help me to solve this question.
sequences-and-series summation divisibility
asked Jul 31 at 6:39
MathsLearner
657213
657213
Finding the last digit of $S_n$ is the same as calculating $S_n mod 10$, and $d_1 mod 10 + d_2 mod 10 = (d_1+d_2) mod 10$. Does that help?
– postmortes
Jul 31 at 6:52
1
I believe $sum^nd_i$ is tabulated at oeis.org/A111072 and for $n=2017$ the table in the link at that page gives 7069.
– Gerry Myerson
Jul 31 at 7:19
add a comment |Â
Finding the last digit of $S_n$ is the same as calculating $S_n mod 10$, and $d_1 mod 10 + d_2 mod 10 = (d_1+d_2) mod 10$. Does that help?
– postmortes
Jul 31 at 6:52
1
I believe $sum^nd_i$ is tabulated at oeis.org/A111072 and for $n=2017$ the table in the link at that page gives 7069.
– Gerry Myerson
Jul 31 at 7:19
Finding the last digit of $S_n$ is the same as calculating $S_n mod 10$, and $d_1 mod 10 + d_2 mod 10 = (d_1+d_2) mod 10$. Does that help?
– postmortes
Jul 31 at 6:52
Finding the last digit of $S_n$ is the same as calculating $S_n mod 10$, and $d_1 mod 10 + d_2 mod 10 = (d_1+d_2) mod 10$. Does that help?
– postmortes
Jul 31 at 6:52
1
1
I believe $sum^nd_i$ is tabulated at oeis.org/A111072 and for $n=2017$ the table in the link at that page gives 7069.
– Gerry Myerson
Jul 31 at 7:19
I believe $sum^nd_i$ is tabulated at oeis.org/A111072 and for $n=2017$ the table in the link at that page gives 7069.
– Gerry Myerson
Jul 31 at 7:19
add a comment |Â
4 Answers
4
active
oldest
votes
up vote
8
down vote
accepted
The $S_n$ are the triangular numbers and their last digit is given by
$$fracn(n+1)2bmod10,$$ which is
$$left(frac n2bmod10right)((n+1)bmod10)bmod10$$ for even $n$ and $$left(frac n+12bmod10right)(nbmod10)bmod10$$ for odd $n$. Hence the sequence has period $20$, with a sum of $70$.
Then the sum
$$sum_i=1^2017fracn(n+1)2bmod10$$
has $100$ complete periods and $17$ remaining terms, $7069$ in total.
This is excellent. I found the period by inspection and then constructed the solution around it. +1
– Piyush Divyanakar
Jul 31 at 9:41
add a comment |Â
up vote
3
down vote
Ok So note the following things for $n=20m$
$$d_n+1+d_n+2...+d_n+4=10 \
d_n+5+d_n+6...+d_n+15=50 \
d_n+16+d_n+16...+d_n+20=10$$
Can you use this to calculate the result?
- Note that $n=20mimplies mod(S_n, 10)=0$. Now $$S_n+1=S_n+20m+1 \ S_n+1=1mod(10) \ S_n+2=3mod(10) \ S_n+3=6mod(10) \ S_n+4=0mod(10)$$
- Note that $n=20m+15impliesmod(S_n,10)=0$, so similar to above argument we can find the sequence form $S_n+5$ to $S_n+15$.
- Same argument work for $S_n+16$ to $S_n+20$.
So to answer the question $sum_1^2000d_i=70timesfrac200020=7000$, $sum_2001^2015d_i=60$, $d_2016=6, d_2017=3$
Hence $T=sum_2001^2017d_i=7069$, $T%1000=69$
add a comment |Â
up vote
1
down vote
continuing
$$0,1,3,6,0,5,1,8,6,5,5,6,8,1,5,0,6,3,1,0,0,1・・・$$
You can find something.
add a comment |Â
up vote
0
down vote
In general, if $f(x)inmathbbQ[x]$ is an integer-valued polynomial of degree $d$ and $m$ is a positive integer, then
$$fbig(n+d!,mbig)equiv f(n)pmodm$$
for every $ninmathbbZ$. Hence, $d!,m$ is a (not necessarily minimal) period of $big(f(n)big)_ninmathbbZ$ modulo $m$. To prove this, it is well known that
$$f(x)=sum_k=0^d,t_k,binomxk$$
for some $t_0,t_1,t_2,ldots,t_k inmathbbZ$. Thus, $F(x):=d!,f(x)$ is a polynomial with integral coefficients. It is also commonly known that, for $g(x)inmathbbZ[x]$, $g(n+N)equiv g(n)pmodN$ for any $ninmathbbZ$ and $NinmathbbZ_>0$. That is,
$$F(n+d!,m)equiv F(n)pmodd!,m,.$$
Dividing both sides by $d!$, noting that $d!mid F(n)$ and $d!mid F(n+d!,m)$, we obtain the desired result.
Now, since $S_n=dfracn(n+1)2$ is an integer-valued polynomial of degree $2$, we see that $S_n$ in modulo $10$ is periodic with period $2!cdot 10=20$. The rest is just as other users have concluded.
add a comment |Â
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
8
down vote
accepted
The $S_n$ are the triangular numbers and their last digit is given by
$$fracn(n+1)2bmod10,$$ which is
$$left(frac n2bmod10right)((n+1)bmod10)bmod10$$ for even $n$ and $$left(frac n+12bmod10right)(nbmod10)bmod10$$ for odd $n$. Hence the sequence has period $20$, with a sum of $70$.
Then the sum
$$sum_i=1^2017fracn(n+1)2bmod10$$
has $100$ complete periods and $17$ remaining terms, $7069$ in total.
This is excellent. I found the period by inspection and then constructed the solution around it. +1
– Piyush Divyanakar
Jul 31 at 9:41
add a comment |Â
up vote
8
down vote
accepted
The $S_n$ are the triangular numbers and their last digit is given by
$$fracn(n+1)2bmod10,$$ which is
$$left(frac n2bmod10right)((n+1)bmod10)bmod10$$ for even $n$ and $$left(frac n+12bmod10right)(nbmod10)bmod10$$ for odd $n$. Hence the sequence has period $20$, with a sum of $70$.
Then the sum
$$sum_i=1^2017fracn(n+1)2bmod10$$
has $100$ complete periods and $17$ remaining terms, $7069$ in total.
This is excellent. I found the period by inspection and then constructed the solution around it. +1
– Piyush Divyanakar
Jul 31 at 9:41
add a comment |Â
up vote
8
down vote
accepted
up vote
8
down vote
accepted
The $S_n$ are the triangular numbers and their last digit is given by
$$fracn(n+1)2bmod10,$$ which is
$$left(frac n2bmod10right)((n+1)bmod10)bmod10$$ for even $n$ and $$left(frac n+12bmod10right)(nbmod10)bmod10$$ for odd $n$. Hence the sequence has period $20$, with a sum of $70$.
Then the sum
$$sum_i=1^2017fracn(n+1)2bmod10$$
has $100$ complete periods and $17$ remaining terms, $7069$ in total.
The $S_n$ are the triangular numbers and their last digit is given by
$$fracn(n+1)2bmod10,$$ which is
$$left(frac n2bmod10right)((n+1)bmod10)bmod10$$ for even $n$ and $$left(frac n+12bmod10right)(nbmod10)bmod10$$ for odd $n$. Hence the sequence has period $20$, with a sum of $70$.
Then the sum
$$sum_i=1^2017fracn(n+1)2bmod10$$
has $100$ complete periods and $17$ remaining terms, $7069$ in total.
edited Jul 31 at 14:44
answered Jul 31 at 8:04
Yves Daoust
110k665203
110k665203
This is excellent. I found the period by inspection and then constructed the solution around it. +1
– Piyush Divyanakar
Jul 31 at 9:41
add a comment |Â
This is excellent. I found the period by inspection and then constructed the solution around it. +1
– Piyush Divyanakar
Jul 31 at 9:41
This is excellent. I found the period by inspection and then constructed the solution around it. +1
– Piyush Divyanakar
Jul 31 at 9:41
This is excellent. I found the period by inspection and then constructed the solution around it. +1
– Piyush Divyanakar
Jul 31 at 9:41
add a comment |Â
up vote
3
down vote
Ok So note the following things for $n=20m$
$$d_n+1+d_n+2...+d_n+4=10 \
d_n+5+d_n+6...+d_n+15=50 \
d_n+16+d_n+16...+d_n+20=10$$
Can you use this to calculate the result?
- Note that $n=20mimplies mod(S_n, 10)=0$. Now $$S_n+1=S_n+20m+1 \ S_n+1=1mod(10) \ S_n+2=3mod(10) \ S_n+3=6mod(10) \ S_n+4=0mod(10)$$
- Note that $n=20m+15impliesmod(S_n,10)=0$, so similar to above argument we can find the sequence form $S_n+5$ to $S_n+15$.
- Same argument work for $S_n+16$ to $S_n+20$.
So to answer the question $sum_1^2000d_i=70timesfrac200020=7000$, $sum_2001^2015d_i=60$, $d_2016=6, d_2017=3$
Hence $T=sum_2001^2017d_i=7069$, $T%1000=69$
add a comment |Â
up vote
3
down vote
Ok So note the following things for $n=20m$
$$d_n+1+d_n+2...+d_n+4=10 \
d_n+5+d_n+6...+d_n+15=50 \
d_n+16+d_n+16...+d_n+20=10$$
Can you use this to calculate the result?
- Note that $n=20mimplies mod(S_n, 10)=0$. Now $$S_n+1=S_n+20m+1 \ S_n+1=1mod(10) \ S_n+2=3mod(10) \ S_n+3=6mod(10) \ S_n+4=0mod(10)$$
- Note that $n=20m+15impliesmod(S_n,10)=0$, so similar to above argument we can find the sequence form $S_n+5$ to $S_n+15$.
- Same argument work for $S_n+16$ to $S_n+20$.
So to answer the question $sum_1^2000d_i=70timesfrac200020=7000$, $sum_2001^2015d_i=60$, $d_2016=6, d_2017=3$
Hence $T=sum_2001^2017d_i=7069$, $T%1000=69$
add a comment |Â
up vote
3
down vote
up vote
3
down vote
Ok So note the following things for $n=20m$
$$d_n+1+d_n+2...+d_n+4=10 \
d_n+5+d_n+6...+d_n+15=50 \
d_n+16+d_n+16...+d_n+20=10$$
Can you use this to calculate the result?
- Note that $n=20mimplies mod(S_n, 10)=0$. Now $$S_n+1=S_n+20m+1 \ S_n+1=1mod(10) \ S_n+2=3mod(10) \ S_n+3=6mod(10) \ S_n+4=0mod(10)$$
- Note that $n=20m+15impliesmod(S_n,10)=0$, so similar to above argument we can find the sequence form $S_n+5$ to $S_n+15$.
- Same argument work for $S_n+16$ to $S_n+20$.
So to answer the question $sum_1^2000d_i=70timesfrac200020=7000$, $sum_2001^2015d_i=60$, $d_2016=6, d_2017=3$
Hence $T=sum_2001^2017d_i=7069$, $T%1000=69$
Ok So note the following things for $n=20m$
$$d_n+1+d_n+2...+d_n+4=10 \
d_n+5+d_n+6...+d_n+15=50 \
d_n+16+d_n+16...+d_n+20=10$$
Can you use this to calculate the result?
- Note that $n=20mimplies mod(S_n, 10)=0$. Now $$S_n+1=S_n+20m+1 \ S_n+1=1mod(10) \ S_n+2=3mod(10) \ S_n+3=6mod(10) \ S_n+4=0mod(10)$$
- Note that $n=20m+15impliesmod(S_n,10)=0$, so similar to above argument we can find the sequence form $S_n+5$ to $S_n+15$.
- Same argument work for $S_n+16$ to $S_n+20$.
So to answer the question $sum_1^2000d_i=70timesfrac200020=7000$, $sum_2001^2015d_i=60$, $d_2016=6, d_2017=3$
Hence $T=sum_2001^2017d_i=7069$, $T%1000=69$
edited Jul 31 at 7:35
answered Jul 31 at 7:17
Piyush Divyanakar
3,258122
3,258122
add a comment |Â
add a comment |Â
up vote
1
down vote
continuing
$$0,1,3,6,0,5,1,8,6,5,5,6,8,1,5,0,6,3,1,0,0,1・・・$$
You can find something.
add a comment |Â
up vote
1
down vote
continuing
$$0,1,3,6,0,5,1,8,6,5,5,6,8,1,5,0,6,3,1,0,0,1・・・$$
You can find something.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
continuing
$$0,1,3,6,0,5,1,8,6,5,5,6,8,1,5,0,6,3,1,0,0,1・・・$$
You can find something.
continuing
$$0,1,3,6,0,5,1,8,6,5,5,6,8,1,5,0,6,3,1,0,0,1・・・$$
You can find something.
answered Jul 31 at 7:44
Takahiro Waki
1,964520
1,964520
add a comment |Â
add a comment |Â
up vote
0
down vote
In general, if $f(x)inmathbbQ[x]$ is an integer-valued polynomial of degree $d$ and $m$ is a positive integer, then
$$fbig(n+d!,mbig)equiv f(n)pmodm$$
for every $ninmathbbZ$. Hence, $d!,m$ is a (not necessarily minimal) period of $big(f(n)big)_ninmathbbZ$ modulo $m$. To prove this, it is well known that
$$f(x)=sum_k=0^d,t_k,binomxk$$
for some $t_0,t_1,t_2,ldots,t_k inmathbbZ$. Thus, $F(x):=d!,f(x)$ is a polynomial with integral coefficients. It is also commonly known that, for $g(x)inmathbbZ[x]$, $g(n+N)equiv g(n)pmodN$ for any $ninmathbbZ$ and $NinmathbbZ_>0$. That is,
$$F(n+d!,m)equiv F(n)pmodd!,m,.$$
Dividing both sides by $d!$, noting that $d!mid F(n)$ and $d!mid F(n+d!,m)$, we obtain the desired result.
Now, since $S_n=dfracn(n+1)2$ is an integer-valued polynomial of degree $2$, we see that $S_n$ in modulo $10$ is periodic with period $2!cdot 10=20$. The rest is just as other users have concluded.
add a comment |Â
up vote
0
down vote
In general, if $f(x)inmathbbQ[x]$ is an integer-valued polynomial of degree $d$ and $m$ is a positive integer, then
$$fbig(n+d!,mbig)equiv f(n)pmodm$$
for every $ninmathbbZ$. Hence, $d!,m$ is a (not necessarily minimal) period of $big(f(n)big)_ninmathbbZ$ modulo $m$. To prove this, it is well known that
$$f(x)=sum_k=0^d,t_k,binomxk$$
for some $t_0,t_1,t_2,ldots,t_k inmathbbZ$. Thus, $F(x):=d!,f(x)$ is a polynomial with integral coefficients. It is also commonly known that, for $g(x)inmathbbZ[x]$, $g(n+N)equiv g(n)pmodN$ for any $ninmathbbZ$ and $NinmathbbZ_>0$. That is,
$$F(n+d!,m)equiv F(n)pmodd!,m,.$$
Dividing both sides by $d!$, noting that $d!mid F(n)$ and $d!mid F(n+d!,m)$, we obtain the desired result.
Now, since $S_n=dfracn(n+1)2$ is an integer-valued polynomial of degree $2$, we see that $S_n$ in modulo $10$ is periodic with period $2!cdot 10=20$. The rest is just as other users have concluded.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
In general, if $f(x)inmathbbQ[x]$ is an integer-valued polynomial of degree $d$ and $m$ is a positive integer, then
$$fbig(n+d!,mbig)equiv f(n)pmodm$$
for every $ninmathbbZ$. Hence, $d!,m$ is a (not necessarily minimal) period of $big(f(n)big)_ninmathbbZ$ modulo $m$. To prove this, it is well known that
$$f(x)=sum_k=0^d,t_k,binomxk$$
for some $t_0,t_1,t_2,ldots,t_k inmathbbZ$. Thus, $F(x):=d!,f(x)$ is a polynomial with integral coefficients. It is also commonly known that, for $g(x)inmathbbZ[x]$, $g(n+N)equiv g(n)pmodN$ for any $ninmathbbZ$ and $NinmathbbZ_>0$. That is,
$$F(n+d!,m)equiv F(n)pmodd!,m,.$$
Dividing both sides by $d!$, noting that $d!mid F(n)$ and $d!mid F(n+d!,m)$, we obtain the desired result.
Now, since $S_n=dfracn(n+1)2$ is an integer-valued polynomial of degree $2$, we see that $S_n$ in modulo $10$ is periodic with period $2!cdot 10=20$. The rest is just as other users have concluded.
In general, if $f(x)inmathbbQ[x]$ is an integer-valued polynomial of degree $d$ and $m$ is a positive integer, then
$$fbig(n+d!,mbig)equiv f(n)pmodm$$
for every $ninmathbbZ$. Hence, $d!,m$ is a (not necessarily minimal) period of $big(f(n)big)_ninmathbbZ$ modulo $m$. To prove this, it is well known that
$$f(x)=sum_k=0^d,t_k,binomxk$$
for some $t_0,t_1,t_2,ldots,t_k inmathbbZ$. Thus, $F(x):=d!,f(x)$ is a polynomial with integral coefficients. It is also commonly known that, for $g(x)inmathbbZ[x]$, $g(n+N)equiv g(n)pmodN$ for any $ninmathbbZ$ and $NinmathbbZ_>0$. That is,
$$F(n+d!,m)equiv F(n)pmodd!,m,.$$
Dividing both sides by $d!$, noting that $d!mid F(n)$ and $d!mid F(n+d!,m)$, we obtain the desired result.
Now, since $S_n=dfracn(n+1)2$ is an integer-valued polynomial of degree $2$, we see that $S_n$ in modulo $10$ is periodic with period $2!cdot 10=20$. The rest is just as other users have concluded.
answered Jul 31 at 9:15


Batominovski
22.8k22776
22.8k22776
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2867730%2fsum-of-last-digits-of-a-sum%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Finding the last digit of $S_n$ is the same as calculating $S_n mod 10$, and $d_1 mod 10 + d_2 mod 10 = (d_1+d_2) mod 10$. Does that help?
– postmortes
Jul 31 at 6:52
1
I believe $sum^nd_i$ is tabulated at oeis.org/A111072 and for $n=2017$ the table in the link at that page gives 7069.
– Gerry Myerson
Jul 31 at 7:19