AMC 10 Step by Step

2021 AMC Fall 10A Problem 23

P21-25~9 minPrint

For each positive integer nn , let f1(n)f_1(n) be twice the number of positive integer divisors of nn , and for j≥2j \ge 2 , let fj(n)=f1(fj−1(n))f_j(n) = f_1(f_{j-1}(n)) . For how many values of n≤50n \le 50 is f50(n)=12?f_{50}(n) = 12?

Log in to save your progress.
Show solution without answering

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 d(n)d(n) for the number of divisors of nn, so f1(n)=2×d(n)f_1(n) = 2 \times d(n). For example, 1212 has divisors 1,2,3,4,6,121, 2, 3, 4, 6, 12, so d(12)=6d(12) = 6 and f1(12)=12f_1(12) = 12.

Applying f1f_1 fifty times sounds hard, but the numbers get small fast. So first see where the small numbers end up.

  1. After one step, the number is small. For n≤50n \le 50, no number has more than 1010 divisors (4848 has 1010: 1,2,3,4,6,8,12,16,24,481, 2, 3, 4, 6, 8, 12, 16, 24, 48). So f1(n)f_1(n) is an even number from 22 to 2020.
  2. Follow every even number up to 2020.
mm2468101214161820
d(m)d(m)2344464566
f1(m)f_1(m)46888128101212

So 88 goes to 88 and 1212 goes to 1212: once there, a number stays forever. Every other number reaches 88 or 1212 in a few steps: 2→4→6→82 \to 4 \to 6 \to 8, and 16→10→816 \to 10 \to 8.
3. Which ones end at 1212? Only 1212, 1818 and 2020 (they go straight to 1212). Fifty steps is far more than enough to settle. So f50(n)=12f_{50}(n) = 12 exactly when f1(n)f_1(n) is 1212, 1818 or 2020, which means d(n)d(n) is 66, 99 or 1010.
4. Count divisors with the prime factorization. If n=paqbn = p^a q^b with different primes pp, qq, then d(n)=(a+1)(b+1)d(n) = (a+1)(b+1).
- d(n)=6=6×1=3×2d(n) = 6 = 6 \times 1 = 3 \times 2: n=p5n = p^5 or n=p2qn = p^2 q. Up to 5050: 3232, and 12,18,20,28,44,45,5012, 18, 20, 28, 44, 45, 50. That is 88 numbers.
- d(n)=9=3×3d(n) = 9 = 3 \times 3: n=p2q2n = p^2 q^2 (or p8p^8, too big). Only 3636.
- d(n)=10=5×2d(n) = 10 = 5 \times 2: n=p4qn = p^4 q (or p9p^9, too big). Only 48=24×348 = 2^4 \times 3.
5. Total. 8+1+1=108 + 1 + 1 = 10.

The answer is (D) 10\boxed{\textbf{(D)}\ 10}.

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 88 or 1212. Then work backwards: which first steps lead to 1212? That leaves a standard count of numbers with a given number of divisors.

Concise solution

A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.

Write d(n)d(n) for the number of divisors, so f1(n)=2d(n)f_1(n) = 2d(n).

Where do iterates go? For n≤50n \le 50, d(n)≤10d(n) \le 10 (the maximum is d(48)=10d(48) = 10), so f1(n)f_1(n) is an even number at most 2020. Now track every even number up to 2020:
2→4→6→8→8,10→8,14→8,16→10→8,2 \to 4 \to 6 \to 8 \to 8, \qquad 10 \to 8, \qquad 14 \to 8, \qquad 16 \to 10 \to 8,
12→12,18→12,20→12.12 \to 12, \qquad 18 \to 12, \qquad 20 \to 12.
So 88 and 1212 are the only fixed points, and after one step every n≤50n \le 50 is at some even number ≤20\le 20, which then falls into 88 or 1212 within a few steps. Hence f50(n)=12f_{50}(n) = 12 exactly when f1(n)∈{12,18,20}f_1(n) \in \{12, 18, 20\}, i.e. when d(n)∈{6,9,10}d(n) \in \{6, 9, 10\}.

Count. Using d(paqb)=(a+1)(b+1)d(p^a q^b) = (a+1)(b+1):

  • d(n)=6d(n) = 6: n=p5n = p^5 or p2qp^2 q. Up to 5050: 3232; 12,18,20,28,44,45,5012, 18, 20, 28, 44, 45, 50. That is 88 numbers.
  • d(n)=9d(n) = 9: n=p8n = p^8 or p2q2p^2 q^2. Only 3636.
  • d(n)=10d(n) = 10: n=p9n = p^9 or p4qp^4 q. Only 4848.

Total 8+1+1=108 + 1 + 1 = 10.

The answer is (D) 10\boxed{\textbf{(D)}\ 10}.

Review in the AoPS books

Similar problems

Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.