What is the sum of all the natural numbers between $500$ and $1000$. What is the sum of all the natural numbers between $500$ and $1000$ (extremes included) that are multiples of $2$ but not of $7$?

\begin{align*}
\sum_{i=0}^{250}(500+2i)-\sum_{i=0}^{35}(504+14i)
&=251\cdot500+2\sum_{i=0}^{250}i-36\cdot504-14\sum_{i=0}^{35}i\\
&=251\cdot500+2\biggl[\frac{251(0+250)}2\biggr]-36\cdot504-14\biggl[\frac{36(0+35)}2\biggr]\\
&=161286
\end{align*}
using the arithmetic progression formula (see here).
