For each positive integer , let be twice the number of positive integer divisors of , and for , let . For how many values of is
- A)
- B)
- C)
- D)
- E)
Answer
D
Key insight
For n up to 50, f1(n) is an even number at most 20. Only 12, 18 and 20 end at 12, so count n with 6, 9 or 10 divisors.
Solution
Write for the number of divisors of , so . For example, has divisors , so and .
Applying fifty times sounds hard, but the numbers get small fast. So first see where the small numbers end up.
- After one step, the number is small. For , no number has more than divisors ( has : ). So is an even number from to .
- Follow every even number up to .
| 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | |
|---|---|---|---|---|---|---|---|---|---|---|
| 2 | 3 | 4 | 4 | 4 | 6 | 4 | 5 | 6 | 6 | |
| 4 | 6 | 8 | 8 | 8 | 12 | 8 | 10 | 12 | 12 |
So goes to and goes to : once there, a number stays forever. Every other number reaches or in a few steps: , and .
3. Which ones end at ? Only , and (they go straight to ). Fifty steps is far more than enough to settle. So exactly when is , or , which means is , or .
4. Count divisors with the prime factorization. If with different primes , , then .
- : or . Up to : , and . That is numbers.
- : (or , too big). Only .
- : (or , too big). Only .
5. Total. .
The answer is .
Why this works
When a function is applied over and over, look at where the values go after one step. Here every starting number lands among ten small even numbers, and a short table shows each one ends at or . Then work backwards: which first steps lead to ? That leaves a standard count of numbers with a given number of divisors.
The trap
Counting only the numbers with exactly 6 divisors (there are 8) and missing 36 and 48, which reach 18 and 20 and then fall into 12.
Concise solution
Write for the number of divisors, so .
Where do iterates go? For , (the maximum is ), so is an even number at most . Now track every even number up to :
So and are the only fixed points, and after one step every is at some even number , which then falls into or within a few steps. Hence exactly when , i.e. when .
Count. Using :
- : or . Up to : ; . That is numbers.
- : or . Only .
- : or . Only .
Total .
The answer is .
Review in the AoPS books
- Introduction to Number Theory, Chapter 1: Integers: The Basics (§1.4, §1.5)
- Introduction to Algebra, Chapter 21: Sequences & Series (§21.1, §21.2, §21.3, §21.4)
- Prealgebra, Chapter 15: Problem-Solving Strategies (§15.1)
- Introduction to Number Theory, Chapter 5: Divisor Problems (§5.2, §5.3)
Techniques
Organized listing / direct enumeration · Compute small cases, spot the pattern, generalize · Start from the end state / desired conclusion and reverse