Consider the set of integers between $1000$ and $9 999$ inclusive. How many integers in this set:
(i) are divisible by $2$?
(ii) are divisible by $3$?
(iii) are divisible by $2$ and $3$?
What I've tried so far:
(i) $\frac{9999-1000}{2} = 4499.5$
i.e. $4499$ (but since it's inclusive of $1000$), $4499 + 1 = 4500$.
(ii)$\frac{9999-1000}{3} = 2999.66\dots$
i.e. $2999$ (but since it's inclusive of $9999$), $2999+1 = 3000.$
I'm sure this logic/method of solving this question is wrong, and have come across many variations of this problem in exams before but do not know the reasoning behind solving it.
What are the steps for approaching such problems? Thanks!
Your logic is correct except for one part.
Because the set of numbers includes both $1,000$ and $9,999$, its cardinality will be $9,999-1,000+1=9,000$.
So the answers are:
(i) $\frac{9,999-1,000+1}{2}=4,500$ (This works because $1,000$ is a multiple of $2$.)
(ii) $\frac{9,999-1,000+1}{3}=3,000$ (This works because $9,999$ is a multiple of $3$.)
(iii) $\frac{9,999-1,000+1}{6}-1=1,499$ (This works because neither $1,000$ or $9,999$ is a multiple of $6$.)