[Math] the sum of all the natural numbers between $500$ and $1000$.

arithmeticdivisibilitysequences-and-series

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

Best Answer

In general, the sum of an arithmetic progression is $$S_n = \sum_{i=1}^{n} a_i=\frac{n}{2}(a_1+a_n)$$

So, the sum of all even numbers in your interval

$$ = \frac{251}{2}(500+1000)$$

And the sum of all multiples of $14$ in your interval $$ = \frac{36}{2}(504+994)$$

Subtracting these two answers will give you the result you are looking for.