SOLUTION: find the sum of all natural numbers between 1 and 100 which are not exactly divisible by 2 or 3?

Algebra ->  Sequences-and-series -> SOLUTION: find the sum of all natural numbers between 1 and 100 which are not exactly divisible by 2 or 3?      Log On


   



Question 739966: find the sum of all natural numbers between 1 and 100 which are not exactly divisible by 2 or 3?
Answer by KMST(5328) About Me  (Show Source):
You can put this solution on YOUR website!
We can find that sum if we find the sum for all the natural numbers between i and 100, and for the sums for those numbers that are not supposed to be counted.

The sum of all integers from 1 to n is
sum%28i%2Ci=1%2Ci=n%29=n%28n%2B1%29%2F2

The sum of all natural numbers between 1 and 100 is 100%2A101%2F2=50%2A101=5050
The sum of all natural numbers between 1 and 100 that are exactly divisible by 2 is
sum%282i%2Ci=1%2Ci=50%29=2%2Asum%28i%2Ci=1%2Ci=50%29=2%2A%2850%2A51%2F2%29=50%2A51=2550

The sum of all natural numbers between 1 and 100 that are exactly divisible by 3 is


All numbers that are exactly divisible by 2 and 3 are divisible by 6, and all numbers exactly divisible by 6 are divisible by 2 and 3.
The sum of all natural numbers between 1 and 100 that are exactly divisible by 2 and 3 is the sum of all natural numbers between 1 and 100 that are exactly divisible by 6, which can be calculated as
sum%286i%2Ci=2%2Ci=16%29=6%2Asum%28i%2Ci=1%2Ci=16%29=6%2A%2816%2A17%2F2%29=48%2A17=816

To find the sum we want, we start with the sum of all the natural numbers from 1 to 100;
we subtract the sum of those that are exactly divisible by 2;
we subtract the sum of those that are exactly divisible by 3,
and since in the previous subtractions we subtracted the numbers divisible bt 6 twice,
we add the sum of natural numbers between 1 and 100 that are exactly divisible by 6.


or if you prefer, you can calculate it as
5050-2550-1683%2B816=2500-99%2A17%2B48%2A17=highlight%281633%29