How Many Numbers $[1,1000]$ divide in $11$ and $3$ but not divide in $5,2,7$
I`m trying to check how many numbers $[1,1000]$ divide in $11$ and $3$ but
not divide in $5,2,7$.
what I did so far is to use Inclusion–exclusion principle:
$$N'=(C_{1}'C_{2}'\dots C_{t}')=N-\sum_{i=1}^{t}N(C)+\sum_{1\leq i\leq j
\leq t}N(C_{i}C_{j})-\sum_{1\leq i\leq j\leq k \leq
t}N(C_{i}C_{j}C_{k})+\dots+(-1)^t \cdot N(C_{1}C_{2}\dots C_{2})$$
first I checked how much numbers not divide in $5,2,7$
set : $C_{1},C_{2},C_{3}$
$C_{1} \rightarrow$ divide with 2
$C_{2} \rightarrow$ divide with 5
$C_{3} \rightarrow$ divide with 7
now I check all the combinations:
$C_{1} = \big[\frac{1000}{2}\big]=500$
$C_{2} = \big[\frac{1000}{5}\big]=200$
$C_{3} = \big[\frac{1000}{7}\big]=142$ 7 is the lcm of $2,7$
$C_{1}C_{2}=\big[\frac{1000}{10}\big]=100$
$C_{1}C_{3}=\big[\frac{1000}{14}\big]=71$ I am taking the Integer
$C_{2}C_{3}=\big[\frac{1000}{35}\big]=28$ lcm of $5,7$
$C_{1}C_{2}C_{3}=\big[\frac{1000}{70}\big]=14$
Now after I checked all the combinations I calculate all the numbers:
$$1000-842+199-14=343$$ 1000 is all the numbers $[1,1000]$
I dont know if I am doing right, this is the way to solve it? I would like
to get some advice.
thanks!
No comments:
Post a Comment