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