9
$\begingroup$

Find sum of numbers from $1$ to $100$ which are not divisible by $3$ and $5$?

I can understand that the here we require to sum up these numbers:

$1+2+4+7+8+11+13+14+16+17+19+22+23+26+28+29+31+32+34$ $+37+38+41+43+44+46+47+49+52+53 +56+58+59+61+62+64+67+68+71$ $+73+74+76+77+79+82+83+86+88+89+91+92+94+97+98$

Which gives the sum $= 2632$,but I any didn't relation among the numbers in this series,any ideas? Also,I am supposed to do this under a mint so please hint/answer accordingly.

  • 4
    In my opinion, there would be a problem if a test question was worded **exactly** like the above, for there is ambiguity. The phrase "not divisible by $3$ and $5$" could be interpreted by a student as meaning not divisible by both of $3$ and $5$, that is, everybody but the multiples of $15$. The wording "divisible neither by $3$ nor by $5$" is, by contrast, unambiguous.2011-07-20
  • 0
    Yes,initially I was only taking out the multiples of $15$ from $5050$.2011-07-22
  • 1
    That was a sensible interpretation of the substandard wording used in the problem.2011-07-22
  • 0
    but certainly giving me an answer that is not in any of the options and which tends me to check my calculations again and hence waste of precious seconds!:/2011-07-22

4 Answers 4

17

This is a combinatorial argument called Inclusion-exclusion principle: $$X=1+\ldots+100 - 3(1+\ldots+33) - 5(1+\ldots+20) + 15(1+\ldots+6)$$

First we add all the numbers, then we remove all those which are divisible by $3$, and those divisible by $5$. But wait a minute! What about $15$? We removed that number twice! We therefore need to add it once, as well the rest of its multiples below $100$.

Now using the summation formula: $1+\ldots+n = \frac{n(n+1)}{2}$ the answer follows.

6

The sum of the numbers which are divisible by $3$ in this range is $$ 3+6+\cdots+99=3(1+2+\cdots+33) $$ and likewise the sum of those divisible by $5$ is $$ 5+10+\cdots+100=5(1+2+\cdots+20). $$ You should be aware of a quick formula to add these two sums. Be careful to add back all the numbers that are divisible by $15$, as they have been subtracted twice. Thanks to Gauss, we know that the sum of the first $100$ integers is $5050$, and after doing the arithmetic you get your answer.

5

Hint: First try finding the sum of numbers which are divisible by $3$ or $5$

  • 0
    Sub-hint: find the sum of numbers which are divisible by 3, then the sum of those divisible by 5, and finally the sum of those divisible by 15.2011-07-20
  • 0
    Okay,for that I have to sum up two G.P series for $3$ and $5$ respectively,then subtract the $15$ series and then subtract this whole result from $5050$? Do you mean this?2011-07-20
  • 0
    @Debanjan: They are not GP. They are AP.2011-07-20
  • 0
    Yeps,A.P indeed.2011-07-20
  • 0
    Accepting this one as hint is enough for me in this case.2011-07-20
  • 0
    @Deb: I am guessing Asaf's/yunone's answer will work better for others that have this question, so it might be better to accept one of those.2011-07-20
  • 0
    Agreed,okay for the sake of future readers. :-)2011-07-20
2

There's something called inclusion-exclusion you wanna use : sum all integers up to 100, remove those divisible by 3, remove those divisible by 5, then add those divisible by 15. =)