For how many positive integers less than or equal to is evenly divisible by
- A)
- B)
- C)
- D)
- E)
Answer
C
Key insight
n!/(1+...+n) = 2(n-1)!/(n+1), which fails to be an integer exactly when n+1 is an odd prime; eight such n up to 24, so 24 - 8 = 16.
Solution
Since , the quotient is
So we need to divide .
If is an odd prime : divides neither nor any factor of , so the quotient is not an integer. These fail.
Otherwise: if (), the quotient is . If , the quotient is . If is composite and at least , write with ; if both appear as separate factors in , and if with then and both lie in . Either way divides . These succeed.
The odd primes up to are : eight values of , hence eight failing . The count of successes is .
The answer is .
Why this works
Simplify the divisibility condition algebraically before testing anything; the factor cancels and the question becomes "does divide ." A prime is the only kind of integer that cannot be assembled from smaller factors inside a factorial, so primes are exactly the obstruction. Counting the failures is much easier than counting the successes.
Alternative approach
Under time pressure, test a few values: (, fails), (, works), (, fails), (, works), (, fails). The failures are exactly those with prime, which suggests the rule and the count .
The trap
Missing that n + 1 = 4 and n + 1 = 9 (squares of primes) still work, or forgetting the case n + 1 = 2 works because of the factor 2.
Common mistakes
- Missing that n + 1 = 4 and n + 1 = 9 (squares of primes) still work, or forgetting the case n + 1 = 2 works because of the factor 2.
- Counting all primes up to (nine, including ) as failures and answering , or counting primes up to and mishandling .
Techniques
Apply an identity: SFFT, sum of squares, difference of cubes, Vieta · Count the complement and subtract from the total