For a positive integer $n$, let $d_n$ be the units digit of $1 + 2 + \dots + n$. Find the remainder when \[\sum_{n=1}^{2017} d_n\] is divided by $1000$.
$\frac{(n+20)(n+21)}2-\frac{n(n+1)}2=20n+210\equiv0\pmod{10}$, so $d_n$ has period $20$. One period is $1,3,6,0,5,1,8,6,5,5,6,8,1,5,0,6,3,1,0,0$, with sum $70$.
$2017=100\cdot20+17$, and the first $17$ terms of a period add to $69$.
The sum is $7000+69=7069$, remainder $69$. The answer is $\boxed{069}$.
For a positive integer $n$, let $d_n$ be the units digit of $1 + 2 + \dots + n$. Find the remainder when \[\sum_{n=1}^{2025} d_n\] is divided by $1000$.