2017 AIME II Problems/Problem 4
Problem
Find the number of positive integers less than or equal to whose base-three representation contains no digit equal to .
Solution
The base- representation of is . Because any -digit base- number that starts with and has no digit equal to must be greater than , all -digit numbers that have no digit equal to must start with or in base . Of the base- numbers that have no digit equal to , there are -digit numbers that start with , -digit numbers that start with , -digit numbers, -digit numbers, -digit numbers, -digit numbers, -digit numbers, and -digit numbers. Summing these up, we find that the answer is .
Solution 2 (please add latex)
Note that 2017=220221
And 2187=3^7=10000000 base 3
There can be a 1,2,...,7 digit number less than 2187
Each digit can be 1 or 2
So 2^1 one digit numbers and so on up to 2^7 7 digit
Now we have to subtract out numbers from 2018 to 2187
The either the number must begin 221... or 222... with four more digits at the end
Using 1s and 2s there are 2^4 options for each so:
2+4+8+16+32+64+128-2*16=256-2-32=222
See Also
2017 AIME II (Problems • Answer Key • Resources) | ||
Preceded by Problem 3 |
Followed by Problem 5 | |
1 • 2 • 3 • 4 • 5 • 6 • 7 • 8 • 9 • 10 • 11 • 12 • 13 • 14 • 15 | ||
All AIME Problems and Solutions |
The problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions.