[Math] Find the sum of all three-digit natural numbers that are not exactly divisible by 3.

divisibility

Find the sum of all three-digit natural numbers that are not exactly divisible by 3, is the question.

What quick ways are there of doing questions like these?

Say it was, sum of all three digit natural numbers that are multiples of 14, but not 21?

Best Answer

An arithmetic progression is a sequence of number of the form $a,a+d,a+2d,a+3d,..,a+nd$, that is every two consecutive numbers differ by the same value called $d$.

The formula for the sum of the first $n$ terms of a progression starting at $a$ with common difference $d$ is $\frac{n}{2}[2a+(n-1)d]$.

To solve your problem we need to add all the numbers from 100 to 999 and then subtract the numbers that can be divided exactly by $3$.
The sum of the numbers is the sum of the first $900$ terms of a progression with $a=100$ and $d=1$, that is $\frac{900}{2}(200+899)=494550$

Now we need to calculate the sum of the first $\lceil{\frac{999-100}{3}\rceil=300}$ terms of the sequence with $a=102$ and $d=2$, that is $\frac{300}{2}(2(102)+3(299))=165150$, the result is then $494550-165150=329400$