Skip to main content

2017 AIME II Problem 4

Problem 4 of 15EasierNumber TheoryArithmeticProblem-Solving Techniques

Find the number of positive integers less than or equal to 20172017 whose base-three representation contains no digit equal to 0.0.

Your answer

Integer from 0 to 999
Show solution

Solution

A positive integer has no 00 in base three exactly when every digit is 11 or 2.2. For k=1,2,…,6k = 1, 2, \ldots, 6 there are 2k2^k such kk-digit numbers, and all of them are at most 2222223=728<2017.222222_3 = 728 \lt 2017. Since 2017=22022013,2017 = 2202201_3, a seven-digit string of 11s and 22s is at most 20172017 exactly when it begins with 11,11, 12,12, or 21:21: any string beginning 2222 already beats 220220132202201_3 at the third digit, since its digits are nonzero. That gives 3⋅25=963 \cdot 2^5 = 96 seven-digit numbers. The total is 2+4+8+16+32+642 + 4 + 8 + 16 + 32 + 64 +96=222.+ 96 = 222.
AoPS wiki

Tagged: number base · digits · casework

More practice