1
$\begingroup$

How many of the integers between $100$ and $200$ are divisible by $3$ or divisible by $2$ but not by $5$?

is the range of integer 200-100+1=101 or 100?

$A_5$ number that is divisible by 5

\begin{align*} A_1 & = \left\lfloor{\frac{101}{3}} \right\rfloor = 33 && \text{(divisible by $3$)}\\ A_2 & = \left\lfloor{\frac{101}{2}} \right\rfloor = 50 && \text{(divisible by $2$)}\\ \\ | A_1 \cap A_5 | & = \left\lfloor{\frac{101}{3 \cdot 5}}\right\rfloor = 6\\ | A_2 \cap A_5 | & = \left\lfloor{\frac{101}{2 \cdot 5}}\right\rfloor = 10\\ \\ | A_1 \cap A_2 \cap A_3 | & = \left\lfloor{\frac{101}{2 \cdot 3 \cdot 5}}\right\rfloor = 3 \end{align*}

Therefore, by the principle exclusion inclusion theorem $= 50 + 33 - (6 + 10) + 3 =70 $

Is this right?

Im trying to count one by one such as, and enumerate

for $100-130$ , number that divisible by 2,3 but not 5

$\{102,104,106,111,108,112,114,116,118,122,123,124,126,128\}=14$ number

$14*3=42 $ number $ (100-190)$

for $191-200= ${ $192,194,196,198\}=4$ number

$42+4=46 $

i used program to check:

102 104 106 108 111 112 114 116 117 118 122 123 124 126 128 129 132 134 136 138 141 142 144 146 147 148 152 153 154 156 158 159 162 164 166 168 171 172 174 176 177 178 182 183 184 186 188 189 192 194 196 198

total=52

which one is right?

$\endgroup$
1
  • $\begingroup$ Counting problems should be tagged combinatorics. $\endgroup$ – N. F. Taussig Feb 12 '20 at 21:28
0
$\begingroup$

Your notation is not consistent. It looks like you are using both $A_3$ and $A_5$ to denote numbers divisible by $5$.

Let $A$ denote the set of positive integers satisfying $100 \leq n \leq 200$ which are divisible by $2$; let $B$ denote the set of positive integers satisfying $100 \leq n \leq 200$ which are divisible by $3$; let $C$ denote the set of positive integers satisfying $100 \leq n \leq 200$ which are divisible by $5$. We wish to find $$|(A \cup B) - C| = |A| + |B| - |A \cap B| - |A \cap C| - |B \cap C| + |A \cap B \cap C|$$ You took a shortcut that does not always work. The number of multiples of an integer within $101$ consecutive integers is not always the same as it is for the first $101$ positive integers. In particular, there are $50$ positive even integers between $1$ and $101$ inclusive but $51$ positive even integers between $100$ and $200$ inclusive since both $100$ and $200$ are even. To address this issue, we subtract the number of multiples that are at most $99$ from the number of multiples that are at most $200$. \begin{align*} |A| & = \left\lfloor \frac{200}{2} \right\rfloor - \left\lfloor \frac{99}{2} \right\rfloor = 100 - 49 = 51\\ |B| & = \left\lfloor \frac{200}{3} \right\rfloor - \left\lfloor \frac{99}{3} \right\rfloor = 66 - 33 = 33\\ |A \cap B| & = \left\lfloor \frac{200}{2 \cdot 3} \right\rfloor - \left\lfloor \frac{99}{2 \cdot 3} \right\rfloor = 33 - 16 = 17\\ |A \cap C| & = \left\lfloor \frac{200}{2 \cdot 5} \right\rfloor - \left\lfloor \frac{99}{2 \cdot 5} \right\rfloor = 20 - 9 = 11\\ |B \cap C| & = \left\lfloor \frac{200}{3 \cdot 5} \right\rfloor - \left\lfloor \frac{99}{3 \cdot 5} \right\rfloor = 13 - 6 = 7\\ |A \cap B \cap C| & = \left\lfloor \frac{200}{2 \cdot 3 \cdot 5} \right\rfloor - \left\lfloor \frac{99}{2 \cdot 3 \cdot 5} \right\rfloor = 6 - 3 = 3 \end{align*} Hence, the number of positive integers between $100$ and $200$ which are divisible by $2$ or $3$ but not by $5$ is $$51 + 33 - 17 - 11 - 7 + 3 = 52$$

$\endgroup$
11
  • $\begingroup$ Thankyou so much but if the problem is "How many of the integers between 100 and 200 that are divisible by 3 or divisible by 2 or not divisible by 5 ? Is my answer right 70? $\endgroup$ – kili Feb 12 '20 at 21:59
  • $\begingroup$ There are $80$ numbers between $100$ and $200$ inclusive which are not divisible by $5$. You would then have to add multiples of $2$ or $3$ which are divisible by $5$ to that number, so your answer would be larger than $80$ rather than smaller than $52$. $\endgroup$ – N. F. Taussig Feb 12 '20 at 22:03
  • $\begingroup$ But what is the different from "How many of the integers between 100 and 200 are divisible by 3 or divisible by 2 but not by 5"? and "How many of the integers between 100 and 200 that are divisible by 3 or divisible by 2 or not divisible by 5 ? for the latter do i just need to exclude number that is divisible by 5 only but not by 2 or 3? I think im worng in interpreting the problem $\endgroup$ – kili Feb 12 '20 at 22:15
  • $\begingroup$ Divisible by $2$ or $3$ but not by $5$ should be interpreted as divisible by $2$ or divisible by $3$ and not divisible by $5$, so every multiple of $2$ not divisible by $5$ is included and every multiple of $3$ not divisible by $5$ is included. Divisible by $2$ or $3$ or not divisible by $5$ means every multiple of $2$ is included, every multiple of $3$ is included, and every number not divisible by $5$ is included. $\endgroup$ – N. F. Taussig Feb 12 '20 at 22:21
  • $\begingroup$ for the latter, if the number is multiple of 2 and multiple of 5 ,is it included? to count all number I need only to exclude multiple of 5 but not multiple of 2 or 3? $\endgroup$ – kili Feb 12 '20 at 22:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.