Find the sum of the positive integers which are less than 150 and are not multiples of 5 or 7. Can anyone help me?

Printable View

- Feb 28th 2011, 12:29 AMMichaelLightArithmetic Progression
Find the sum of the positive integers which are less than 150 and are not multiples of 5 or 7. Can anyone help me?

- Feb 28th 2011, 01:04 AMCaptainBlack
- Feb 28th 2011, 01:11 AMemakarov
Already started typing this...

You can use Inclusion-Exclusion Principle. (You don't know much about it; it's mostly common sense.) Let A = {1, ..., 149}, B = {5, 10, 15, ..., 145} (multiples of 5) and C = {7, 14, 21, ..., 147} (multiples of 7). Let |X| denote the number of elements in the set X. Then the answer is $\displaystyle \lvert A\setminus (B\cup C)\rvert=\lvert A\rvert-\lvert B\cup C\rvert$. Further, $\displaystyle \lvert B\cup C\rvert=\lvert B\rvert+\lvert C\rvert-\lvert B\cap C\rvert$. In all this, $\displaystyle \setminus$ denotes set difference, $\displaystyle \cup$ denotes union and $\displaystyle \cap$ denotes intersection. Since 5 and 7 are coprime, $\displaystyle 5\mid n$ and $\displaystyle 7\mid n$ imply $\displaystyle 35\mid n$ for all $\displaystyle n$. Here $\displaystyle m\mid n$ means $\displaystyle m$ divides $\displaystyle n$. Therefore, $\displaystyle B\cap C = \{35, 70, \dots, 140\}$.