Question 739966
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(i,i=1,i=n)=n(n+1)/2}}}
 
The sum of all natural numbers between 1 and 100 is {{{100*101/2=50*101=5050}}}
The sum of all natural numbers between 1 and 100 that are exactly divisible by 2 is
{{{sum(2i,i=1,i=50)=2*sum(i,i=1,i=50)=2*(50*51/2)=50*51=2550}}}
 
The sum of all natural numbers between 1 and 100 that are exactly divisible by 3 is
{{{sum(3i,i=1,i=33)=3*sum(i,i=1,i=33)=3*(33*34/2)=99*(34/2)=99*17=1683}}}
 
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(6i,i=2,i=16)=6*sum(i,i=1,i=16)=6*(16*17/2)=48*17=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.
 
{{{50*101-50*51-99*17+48*17=50*(101-51)-(99-48)17=50*50-51*17=2500-867=highlight(1633)}}}
or if you prefer, you can calculate it as
{{{5050-2550-1683+816=2500-99*17+48*17=highlight(1633)}}}