Problem: For how many positive integers $n \le 1000$ is \[\left\lfloor \dfrac{998}{n} \right\rfloor+\left\lfloor \dfrac{999}{n} \right\rfloor+\left\lfloor \dfrac{1000}{n}\right \rfloor\] not divisible by $3$ ? (Recall that $\lfloor x \rfloor$ is the greatest integer less than or equal to $x$ .)
$\textbf{(A) } 22 \qquad\textbf{(B) } 23 \qquad\textbf{(C) } 24 \qquad\textbf{(D) } 25 \qquad\textbf{(E) } 26$

Solution: Note that $\left\lfloor \frac{998}{n} \right\rfloor + \left\lfloor \frac{999}{n} \right\rfloor + \left\lfloor \frac{1000}{n} \right\rfloor$ is a multiple of $3$ if $\left\lfloor \frac{998}{n} \right\rfloor + \left\lfloor \frac{999}{n} \right\rfloor + \left\lfloor \frac{1000}{n} \right\rfloor$ lies between two consecutive multiples of $n$
$\textbf{Explanation:}$
Let's assume that the above expression does indeed lie betweent two consecutive multiples of $n$ . This implies that $n$ does not divide either $998, 999$ or $1000$ , meaning that when divided by $n$ , none of the quotients are whole. In turn, this also means that they will all have the same whole number part.
If $\frac{998}{n}, \frac{999}{n},$ and $\frac{1000}{n}$ were to have a different whole number part, then $n$ would have to lie within $998$ and $1000$ . If this is confusing, think of why $\frac{6}{5}, \frac{7}{5}$ and $\frac{8}{5}$ have the same whole number part ( $1$ in this case). Here, $n=5$ . What happens to the whole number part when $n=7$
Since $\frac{998}{n}, \frac{999}{n},$ and $\frac{1000}{n}$ have identical whole number parts, their floors are identical, since the floor of a number is equal to its whole number part, discarding its fractional component.
Let $k$ be the number we get when we floor $\frac{998}{n}, \frac{999}{n},$ or $\frac{1000}{n}$ if the three of those numbers lie between two consecutive multiples of $n$ . Adding them up, we get $3k$ (due to their floors being the same), which is a mulutiple of $3$ . So no matter what, we cannot have $\frac{998}{n}, \frac{999}{n},$ and $\frac{1000}{n}$ lie between two consecutive multiples of $n$
What does this mean? It means that there must be some multiple of $n$ within this expression (with some restrictions, as we'll see), in order to prevent the violation of the main restriction. We can proceed with casework now.
$\textbf{Case 1}$
Let's assume that the multiple of $n$ is located at $\frac{998}{n}$ . Luckily, the only prime factors of $998$ are $2$ and $499$
We can observe that $499$ doesn't work, since $\frac{998}{499}$ and $\frac{1000}{499}$ will both round down to $2$ when divided by it. However, $2$ does work, since it divides both $998$ and $1000$ . The floor of $\frac{999}{2}$ is $499$ , , meaning that when we evaluate the given expression for $n=2$ , we will get $2\cdot{499}+500$ which isn't a multiple of $3$
This case works because we have a multiple of $n$ at the end of the expression, as well as the beginning, so the whole number parts of $998, 999$ and $1000$ when divided by $n$ are not all the same, due to $n$ dividing two of these numbers.
The restriction of $n$ dividing more than one number within the expression is only valid when we're testing the first number in the given expression (otherwise, the other floors wouldn't round down to the same value as the first).
Case $1$ is complete, and we've found that only $2$ works.
$\textbf{Case 2}$
Now, let's assume that the multiple of $n$ is located at $\frac{999}{n}$ . In this case, if $n$ divides $999$ , it doesn't divide $998$ (since two multiples of a number greater than $1$ are never consecutive), nor does it divide $1000$ , for the same reason.
The prime factorization of $999$ is $3^3\cdot37$ , and thus has $(3+1)(1+1)=8$ divisors.
When testing a few values of $n$ initially, we observed that $n=1$ causes the expression to be divisible by $3$ . Subtracting $1$ , we see that there are $7$ values of $n$ that work for this case.
$\textbf{Case 3}$
Finally, let's assume that the multiple of $n$ is located at $\frac{1000}{n}.$
Our goal is to have the other multiple of $n$ below whatever $\frac{998}{n}$ is, so we won't have identical floors throughout the expression.
Once again, any factor of $1000$ , except for $2$ is relatively prime to both $998$ and $999$ , so when we floor those two numbers, we get an integer that isn't $500$
$1000$ factors as $2^3\cdot{5^3}$ , meaning that it has $(3+1)(3+1)=16$ divisors. $1$ and $2$ either don't work or have already been counted, so there are $14$ valid values of $n$ for this case.
$\textbf{Ending}$
Adding these three cases, we get $1+7+14= \boxed{22}$ values of $n$

Answer: A 22