2017 AIME II Problem 4

Below is the professionally curated solution for Problem 4 of the 2017 AIME II, from LIVE by Po-Shen Loh. You can also try the full timed exam, view all 2017 AIME II solutions, or check the answer key.

All of the real AMC 8, AMC 10, AMC 12, and AIME problems in our complete solution collection are used with official legal permission of the Mathematical Association of America (MAA).

Concepts:number basedigitscasework

Difficulty rating: 2230

4.

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

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 325=963 \cdot 2^5 = 96 seven-digit numbers.

The total is 2+4+8+16+32+64+96=222.2 + 4 + 8 + 16 + 32 + 64 + 96 = 222.

← Problem 3Full ExamProblem 5

Problem 4 in Other Years