← run

aime26-18

0.000
0/1 tests· math

Proposed solution

To solve for the number of positive integers \( n \) less than 1000 such that \( f(n) = n \), we need to understand the function \( f(n) \). For a given \( n \), \( f(n) \) converts \( n \) from base 10 to a new base \( b \), where \( b \) is the smallest integer greater than the greatest digit in \( n \). We need to find \( n \) such that this conversion results in \( n \) itself.

First, let's analyze the function \( f(n) \) for different ranges of \( n \):

1. **For \( n \) with digits only from 0 to 9:**
   - If \( n \) has digits only from 0 to 9, then the greatest digit is at most 9, so \( b \) will be 10.
   - Converting \( n \) to base 10 from base 10 results in \( n \), hence \( f(n) = n \) only if \( n \) is a single-digit number (i.e., \( n \) from 1 to 9).

2. **For \( n \) with digits from 10 to 99:**
   - The greatest digit can be at most 9, so \( b \) will be 10.
   - Converting \( n \) to base 10 from base 10 results in \( n \), hence \( f(n) = n \) only if \( n \) is a single-digit number (i.e., \( n \) from 1 to 9).

3. **For \( n \) with digits from 100 to 999:**
   - The greatest digit can be at most 9, so \( b \) will be 10.
   - Converting \( n \) to base 10 from base 10 results in \( n \), hence \( f(n) = n \) only if \( n \) is a single-digit number (i.e., \( n \) from 1 to 9).

From the above analysis, we see that \( f(n) = n \) only if \( n \) is a single-digit number (i.e., \( n \) from 1 to 9). Therefore, we need to count how many such numbers exist.

The single-digit numbers are \( 1, 2, 3, 4, 5, 6, 7, 8, 9 \). There are 7 such numbers.

Thus, the number of positive integers \( n \) less than 1000 such that \( f(n) = n \) is \(\boxed{7}\).