Problem:
For a positive integer n, let dn​ be the units digit of 1+2+3+⋯+n. Find the remainder when
n=1∑2017​dn​
is divided by 1000.
Solution:
Any 20 consecutive positive integers have units digits whose sum is 0+1+2+⋯+ 9+0+1+2+⋯+9=2(1+9)+2(2+8)+2(3+7)+2(4+6)+2(5)=90. Therefore dn+20​=dn​ for all integers n≥1. Thus one only needs to calculate dn​ for 1≤n≤20, and
(d1​,d2​,…,d20​)=(1,3,6,0,5,1,8,6,5,5,6,8,1,5,0,6,3,1,0,0)
Therefore
n=1∑2017​dn​=101n=1∑20​dn​−n=18∑20​dn​=101⋅70−1=7069
The requested remainder is 69​.
The problems on this page are the property of the MAA's American Mathematics Competitions