2021 April MIMC 10 Problems/Problem 15

Paul wrote all positive integers that's less than $2021$ and wrote their base $4$ representation. He randomly choose a number out the list. Paul insist that he want to choose a number that had only $2$ and $3$ as its digits, otherwise he will be depressed and relinquishes to do homework. How many numbers can he choose so that he can finish his homework?

$\textbf{(A)} ~30 \qquad\textbf{(B)} ~62 \qquad\textbf{(C)} ~64 \qquad\textbf{(D)} ~84 \qquad\textbf{(E)} ~126$

Solution

First, we can convert $2021$ to base $4$. $2021_10=133211_4$. Therefore, the total ways to obtain only $2$ and $3$ as its digits that are less than $2^5+2^4+2^3+2^2+2^1+2^0=2^6-2=\fbox{\textbf{(B)} 62}$.