How many $3$-digit counting numbers are exactly divisible by $6$ but not exactly divisible by $9$? I was able to find the answer for $6$ using the formula $T_n=a+(n-1)d$ but not sure how to find the answer for $9$.
[Math] Counting 3-digit integers divisible by 6 but not by 9
combinatoricsdivisibility
Related Question
- [Math] How many three digit numbers are not divisible by 3, 5 or 11
- [Math] How many five digit numbers divisible by $3$ can be formed using the digits $0,1,2,3,4,7$ and $8$ if each digit is to be used at most once
- Count of 6-digit numbers divisible by 6 but not by 9
- Range of numbers not divisible by $2$ or $3$ or $5$
Best Answer
Let us count all three digit numbers which are divisible by six.
There are $\lfloor\frac{999}{6}\rfloor - \lfloor\frac{99}{6}\rfloor$ numbers between $100$ and $999$ (i.e. three digit numbers) which are divisible by six.
How many of these are "bad" and are divisible by nine as well? Well, these would be those numbers which are divisible by six and by nine. In other words, the ones that are divisible by $18$.
$\lfloor\frac{999}{18}\rfloor - \lfloor\frac{99}{18}\rfloor$ of them are bad.
Subtracting and computing the necessary arithmetic will give a final answer.
This answer makes use of the fact that the number of integers between $1$ and $n$ which are divisible by $k$ is $\lfloor\frac{n}{k}\rfloor$, implying that the number of integers between $m$ and $n$ with $m<n$ which are divisible by $k$ will be $\lfloor\frac{n}{k}\rfloor - \lfloor\frac{m-1}{k}\rfloor$