How many integers between 1 and 100 inclusive are either multiples of 2 or are multiples of 5?
There are 50 multiples of 2 and 20 multiples of 5; but, some of the numbers are multiples of both. So, the answer wouldn't be 70. In that case we'd be counting integers like 10 multiple times.
right, so what do you know about multiples of 5?
specifically, what are the last digits of any number divisible by 5?
50 numbers from 0 to 100 divided by 2, among them, the number whose last digit is 0 divided by 5. 20 numbers divided by 5, among them 10 numbers has last digit is 0, hence take off those 10, we have 60 numbers are either divided by 2 or 5 For example, 10 divided by both 2 and 5, hence if we count it on 2, we don't count it on 5|dw:1445479629023:dw|
i had attempted to devise a prime counting function based on this type of idea
\[\pi(n)=floor(\frac{n}{2})+floor(\frac{n}{3})-floor(\frac{n}{2*3})+...\]
Join our real-time social learning platform and learn together with your friends!