# Problem of the Day

How many of the positive integers less than 10,000 are divisible by 3 or 5?

A. 4,666
B. 4,667
C. 5,132
D. 5,133
E. 5,332

A. 4,666

See the Solution

### Solution

[latexpage]

To determine how many positive integers less than or equal to $m$ are divisible by $n$, calculate $\lfloor{\frac{m}{n}}\rfloor$. The symbol $\lfloor \rfloor$ is called the floor function or the greatest integer function. $\lfloor{x}\rfloor$ is defined to be the greatest integer less than or equal to $x$. For example, $\lfloor{3.78}\rfloor=3$. If you’re working with positive numbers, it essentially tells you to ignore the part of the number after the decimal point. If, for example, we want to know how many positive integers less than 14 are divisible by 3, we would calculate $\lfloor{\frac{14}{3}}\rfloor=\lfloor{4.66….}\rfloor=4$. You can verify that this is correct by listing out the numbers if you’d like.

In this question we’re interested in positive integers that are less then 10,000. In other words, less than or equal to 9,999. There are $\lfloor{\frac{9999}{3}}\rfloor=3,333$ positive integers less than 9,999 that are divisible by 3 and $\lfloor{\frac{9999}{5}}\rfloor=1,999$ that are divisible by 5. However, some integers are represented in both sets. For example, 15 is counted in both sets because it is divisible by both 3 and 5, as is 30, 45, 60, and every other multiple of 15. If we add these two totals together, we will be counting all of the multiples of 15 twice. We only want to count them once, so to counter this, we can subtract from this total the number of positive integers less than or equal to 9,999 that are divisible by 15. In sum, the answer should be:

$\lfloor{\frac{9999}{3}}\rfloor+\lfloor{\frac{9999}{5}}\rfloor-\lfloor{\frac{9999}{15}}\rfloor=3,333+1,999-666=4,666$