Find the sum of all natural numbers between $1$ and $1000$ that are not divisible by $13$.


Let $S$ be the unknown sum and $M$ multiples of $13$ less than $1000$, then $S$ can be written in the form $S=S_{1000}-M$, where $S_{1000}$ is the sum of natural numbers between $1$ and $1000$ therefore $S_{1000}=1+2+3+...+999+1000$ with $a_1=1$ and $a_{1000}=1000$ 
Let the $nth$ term be
$S_n=\frac{a_1+a_n}{2}.n$....................... (i)

$S_n=\frac{1+1000}{2}.1000=500500$

We now proceed to solving for multiples of $13$, let $13k$ represent all multiples of $13$ and let there sum be 
$M=13(1)+13(2)+13(3)+...+13(k) =13.(1+2+3+...+k)$............................(ii)
then
$13k\leq{1000}$
$k\leq\frac{1000}{13}=76.923$
This means that the greatest natural number $k$ satisfying the inequality is $76$.

Recall that $M=13.(1+2+3+...+k)$
We are going to compute the $nth$ term of $M$ by simply Multiplying (1) and (2)
$M=13.\frac{a_1+a_k}{2}.n$
$M=13.\frac{1+76}{2}.76=13.\frac{77}{2}.77=38038$
Subtract $M$ from $S_n$ to obtain $S$
$S=500500-38038=462462$. The sum is therefore equal to $462462$.



References 

Ellina Grigoriva (2016), Methods of Solving Sequence and Series Problems, Springer international publishing AG. Pages 12-13