# discrete math functions pigeonhole principle How many numbers in

discrete math
functions pigeonhole principle
How many numbers in the set $\left\{1,2,3,\dots ,346\right\}$ are divisible by 5 or 7 ?

You can still ask an expert for help

## Want to know more about Discrete math?

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

szalbierzfytg

In the given problem we have to find how many numbers in the set $\left\{1,2,3,\dots ,346\right\}$ are divisible by 5 or 7.
Denote A= $\left\{1,2,3,\dots ,346\right\}$
Suppose ${A}_{5}$ be the subset of A containing those numbers which are divisible by 5 and
${A}_{7}$ be the subset of A containing those numbers which are divisible by 7.
Then ${A}_{5}\cap {A}_{7}$ contain those numbers of A which are divisible by both 5 and 7.
And a number is divisible by both 5 and 7 if it is divisible by their least common multiple and $\text{lcm}\left(5,7\right)=35$ .
Therefore a number is divisible by both 5 and 7 if it is divisible by 35.
${A}_{5}\cup {A}_{7}$ contain those numbers of A which are divisible by both 5 or 7.
Therefore we have
$n\left({A}_{5}\right)=\left[\frac{346}{5}\right]=69$ where [] is the greatest integer function.
and
$n\left({A}_{7}\right)=\left[\frac{346}{7}\right]=49$
and
$n\left({A}_{5}\cap {A}_{7}\right)=\left[\frac{346}{35}\right]=9$
Now
$n\left({A}_{5}\cup {A}_{7}\right)=n\left({A}_{5}\right)+\left({A}_{7}\right)-n\left({A}_{5}\cap {A}_{7}\right)$
$⇒n\left({A}_{5}\cup {A}_{7}\right)=69+49-9$
$⇒n\left({A}_{5}\cup {A}_{7}\right)=109$
Hence there are 109 numbers in the set $\left\{1,2,3,\dots ,346\right\}$ are divisible by 5 or 7.