2021 April MIMC 10 Problems/Problem 15
Paul wrote all positive integers that's less than and wrote their base representation. He randomly choose a number out the list. Paul insist that he want to choose a number that had only and 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?
First, we can convert to base . . Therefore, the total ways to obtain only and as its digits that are less than .