HMMT-Feb 2023 guts, Problem 2

Let $n$ be a positive integer, and let $s$ be the sum of the digits of the base-four representation of $2^{n}-1$. If $s=2023$ (in base ten), compute $n$ (in base ten).

Solution: Solution: Every power of 2 is either represented in base 4 as $100 \ldots 00_{4}$ or $200 . .00_{4}$ with some number of zeros. That means every positive integer in the form $2^{n}-1$ is either represented in base 4 as $333 \ldots 33_{4}$ or $133 \ldots 33$ for some number threes. Note that $2023=2022+1=674 \cdot 3+1$, meaning $2^{n}-1$ must be $133 \ldots 333_{4}$ with 674 threes. Converting this to base 2 results in \[ 133 \ldots 33_{4}=200 \ldots 00_{4}-1=2 \cdot 4^{674}-1=2^{1349}-1 \] for an answer of 1349. $\fbox{1349}$.

Answer: 1349