9. How many positive integers $n$ have the property that their representation in base 2 coincides with the base 3 representation of $2 n$?
(A) None
(B) 1
(C) 2
(D) more than 2, but finite
(E) infinite.
9. The answer is (C). Let $n$ be a positive integer. Let $a_{k}, a_{k-1}, \ldots, a_{0}$ be the $k+1$ digits, from left to right, of the base 2 representation of $n$. Each of the $a_{i}$ will take a value between 0 and 1, and we can assume without loss of generality that $a_{k}=1$. Therefore, $n=2^{k} a_{k}+2^{k-1} a_{k-1}+\ldots+a_{0}$. In particular, the estimate $n2^{k+2}$ holds, and thus, combining the estimates derived above, we get $2 n \geq 3^{k}>2^{k+2}>2 n$, which is not possible. Therefore, $k \leq 3$. Now, by hypothesis,

$$
27 a_{3}+9 a_{2}+3 a_{1}+a_{0}=2\left(8 a_{3}+4 a_{2}+2 a_{1}+a_{0}\right)
$$

or equivalently,

$$
11 a_{3}+a_{2}-a_{1}-a_{0}=0
$$

from which it immediately follows that $a_{3}=0$ (otherwise the expression on the left is greater than 8; the $a_{i}$ are either 0 or 1). Now $a_{2}-a_{1}-a_{0}=0$ has exactly two solutions (with at least one digit different from 0), which are $\left(a_{2}, a_{1}, a_{0}\right)=(1,0,1)$ and $\left(a_{2}, a_{1}, a_{0}\right)=(1,1,0)$, corresponding respectively to the two numbers $n=6$ and $n=5$.