For how many positive integers is not divisible by ? (Recall that is the greatest integer less than or equal to .)
- A)
- B)
- C)
- D)
- E)
Answer
A
Key insight
The three floors are equal, so their sum is a multiple of 3, unless n divides 999 or 1000. Count those divisors, leaving out n = 1.
Solution
First see how the three floors compare. Try an example: . Then , , . All three floors are , and the sum is a multiple of .
- When does the floor go up? As the top goes , the floor of (top ) goes up by only when the top hits a multiple of . So the three floors are all equal unless divides or divides .
- Case: divides neither. All three floors equal some . The sum is , a multiple of . Not counted.
- Case: divides but not . Example : floors . The floor steps up at , so the floors are and the sum is . Not a multiple of . Counted.
- Case: divides but not . Example : floors . The sum is . Not a multiple of . Counted.
- Case: divides both. Two numbers in a row share no common factor except , so . The sum is , a multiple of . Not counted.
- Count the divisors. has divisors. has divisors. Leave out of each list: . All of these are at most , as the problem requires.
The answer is .
Why this works
Floors of nearby fractions with the same bottom are almost always equal, and three equal numbers always add to a multiple of . So the only interesting are the ones where the floor "steps up", and that happens exactly at divisors. Then it is a divisor count, with one special number () to watch.
The trap
Adding 8 divisors of 999 and 16 divisors of 1000 to get 24, without noticing that n = 1 is in both lists and gives a sum that is a multiple of 3.
Concise solution
As increases by , increases only when becomes a multiple of . So the three floors for are all equal unless divides or .
Case 1: divides neither. All three floors equal some , the sum is , divisible by . Not counted.
Case 2: but . Then and . Sum : not divisible by . Counted.
Case 3: but . Then and the other two are . Sum : counted.
Case 4: divides both and . Consecutive integers are coprime, so only ; the sum is divisible by . Not counted.
Now count. has divisors; has . Removing from each list leaves values, all at most .
The answer is .
Review in the AoPS books
- Introduction to Number Theory, Chapter 1: Integers: The Basics
- Introduction to Counting & Probability, Chapter 2: Basic Counting Techniques (§2.2)
- Introduction to Algebra, Chapter 20: Special Functions (§20.3)
- Introduction to Number Theory, Chapter 5: Divisor Problems (§5.2, §5.3)
Techniques
Split into exhaustive cases and handle each · Set up the equation/formula and compute; no special trick needed