Problem 655: (2017 AIME II, 4)
Find the number of positive integers less than or equal to $2017$ whose base-three representation contains no digit equal to $0$.
- $2017=2202201_3$. Base-three numbers with $k$ digits, none $0$ number $2^k$.
- Up to six digits: $2+4+\cdots+64=126$. Seven digits, at most $2202201_3$: first digit $1$ gives $2^6=64$; first digits $21$ gives $2^5=32$; first digits $22$: the third digit is at least $1$, giving more than $2202201_3$.
- Total $126+64+32=222$. The answer is $\boxed{222}$.
Find the number of positive integers less than or equal to $3000$ whose base-three representation contains no digit equal to $0$.