返回题库

AIME 2026 II · 第 4 题

AIME 2026 II — Problem 4

专题
Contest Math
难度
L4
来源
AIME

题目详情

Problem

For each positive integer nn let f(n)f(n) be the value of the base-ten numeral nn viewed in base bb, where bb is the least integer greater than the greatest digit in nn. For example, if n=72n=72, then b=8b=8, and 7272 as a numeral in base 88 equals 78+2=587\cdot 8+2=58; therefore f(72)=58f(72)=58. Find the number of positive integers nn less than 10001000 such that f(n)=nf(n)=n.

解析

Solution 1

Notice that if we consider each number in base b<10b<10, then the value strictly decreases. For instance, f(257)=282+581+780f(257)=2\cdot 8^2+5\cdot 8^1+7\cdot 8^0, strictly less than 257=2102+5101+7100257=2\cdot 10^2+5\cdot 10^1+7\cdot 10^0. Therefore, b=10b=10, so the number must contain a 99. The only other cases are when the number has only one digit in which case the base doesn't really matter at all.

We have two cases to consider:

Case 1. Number containing 99. We use complementary counting on three place values, where each place value can contain a digit 090-9, where leading zeros are permitted, and 000000 is understood to be 10001000 (this produces a bijection between the positive integers from 11 to 10001000 inclusive and the possibilities from these three place values). There are 999=7299\cdot9\cdot9=729 ways for none of the three place values to contain a 99, so there are 1000729=2711000-729=271 total possibilities in this case.

Case 2. Other one-digit numbers: 88 possibilities (namely 1,2,,81,2,\ldots,8).

The total is 8+271=2798+271=\boxed{279}.

~ Edited and elaborated by eevee9406

Solution 2

nn is either 11 digit, 22 digits, or 33 digits So take n=an = a. So b=a+1b = a + 1. What is aa in base a+1a + 1? obviously aa. Therefore all 11 digit numbers work. n=10a+cn = 10a + c for the case of 22 digits. Case 1: aa is greater than or equal to cc so b=a+1b = a + 1. We need two digit number acac in base a+1a+1 which is simply (a+1)a+c=10a+c(a + 1)a + c = 10a + c so a+1=10a + 1 = 10 and a=9a = 9. So the two digit number 9c9c works. Case 2: aa is less than or equal to cc so b=c+1b = c + 1. We need two digit number acac in base c+1c + 1 which is simply (c+1)a+c=10a+c(c + 1)a + c = 10a + c or c=9c = 9 so the two digit number a9a9 works. In short, any two digit number with 99 as a digit works. n=100a+10c+dn = 100a + 10c + d for the case of 33 digits. Case 1: aa is the greatest so b=a+1b = a + 1 We have (a+1)2a+(a+1)c+d=100a+10c+d(a + 1)^2 \cdot a + (a + 1)c + d = 100a + 10c + d or (a+1)2a+(a+1)c=100a+10c(a + 1)^2 \cdot a + (a + 1)c = 100a + 10c therefore a((a+1)2100)+c(a9)=0a((a + 1)^2 - 100) + c(a - 9) = 0 or in short the only way this could happen is if both summands are 00 therefore (a+1)2=100(a + 1)^2 = 100 and a9=0a - 9 = 0 so a=9a = 9 works in both cases. We can go through all the casework but by symmetry, we realize any three digit number that has 99 has a digit also works So the number of one digit numbers are 1to91 to 9 or 99. The number of two digit numbers with 99 in it could be all of (1to9)9(1 to 9)9 or 9(0to9)9(0 to 9) so 9+10=199 + 10 = 19 ways subtracting 9999 since that's over counted so 1818 ways. Now for three digits and that could be 9(0to9)(0to9)9(0 to 9)(0 to 9) so 1010=10010 \cdot 10 = 100. Now (1to9)9(0to9)(1 to 9)9(0 to 9) so 910=909 \cdot 10 = 90. And finally (1to9)(0to9)9(1 to 9)(0 to 9)9 so 910=909 \cdot 10 = 90. But we overcount 99(0to9)99(0 to 9) and 9(0to9)99(0 to 9)9 and (1to9)99(1 to 9)99 and 999999 so we overcount 10+10+9=2910 + 10 + 9 = 29 numbers. But we're taking 999999 twice since 99(0to9)99(0 to 9) and 9(0to9)99(0 to 9)9 and (1to9)99(1 to 9)99 all overcount three times, but adding the 999999 we overcount it twice so we need to add a further 11 to only count it once. we have 9+18+100+90+9029+1=27+28029+1=2802+1=2801=2799 + 18 + 100 + 90 + 90 - 29 + 1 = 27 + 280 - 29 + 1 = 280 - 2 + 1 = 280 - 1 = \boxed{279}.

~ilikemath247365

Solution 3 (Basically formalized Solution 1)

For any positive integer n<1000n < 1000, let its digits be represented as dkdk1d0d_k d_{k-1} \dots d_0 in base 1010. Let M=max(dk,dk1,,d0)M = \max(d_k, d_{k-1}, \dots, d_0) be the greatest digit in nn. According to the problem, the base used for f(n)f(n) is b=M+1b = M + 1.

The condition f(n)=nf(n) = n implies:

i=0kdi(M+1)i=i=0kdi(10)i\sum_{i=0}^{k} d_i (M+1)^i = \sum_{i=0}^{k} d_i (10)^i Case 1: M<9M < 9

If the maximum digit MM is less than 99, then the base b=M+1b = M+1 satisfies b9b \le 9.

For single-digit numbers (k=0k=0), the equation simplifies to d0=d0d_0 = d_0, which is an identity. Thus, n{1,2,,8}n \in \{1, 2, \dots, 8\} all work (8 values).

For multi-digit numbers (k1k \ge 1), since M+1<10M+1 < 10, it follows that (M+1)i<10i(M+1)^i < 10^i for all i1i \ge 1. Because di0d_i \ge 0 and at least one di>0d_i > 0 for i1i \ge 1, the Left Hand Side (LHS) is strictly less than the Right Hand Side (RHS). Therefore, no multi-digit numbers work in this case.

Case 2: M=9M = 9

If the maximum digit is 99, then the base is b=9+1=10b = 9+1 = 10.

The equation becomes:

i=0kdi(10)i=i=0kdi(10)i\sum_{i=0}^{k} d_i (10)^i = \sum_{i=0}^{k} d_i (10)^i This is an identity. Thus, any number n<1000n < 1000 that contains at least one digit 99 will satisfy f(n)=nf(n) = n.

Using complementary counting: Integers with no digit 99: Each of the three decimal places (treating 11 as 001001, etc.) can be any of the 99 digits {0,1,,8}\{0, 1, \dots, 8\}. This gives 9×9×9=7299 \times 9 \times 9 = 729 such numbers.

Total for Case 2: 1000729=2711000 - 729 = 271.

Adding the two cases together, we get 8+271=2798 + 271 = \boxed{279}.

~LI,CHENXI