$10 \cdot 65$ For any positive integer $n$, if
$$
f(n)=\left\{\begin{array}{l}
\log _{8} n, \text { if } \log _{8} n \text { is a rational number; } \\
0, \text { if } \log _{8} n \text { is not a rational number. }
\end{array}\right.
$$

then $\sum_{n=1}^{1997} f(n)=$
(A) $\log _{8} 2047$.
(B) 6 .
(C) $\frac{55}{3}$.
(D) $\frac{58}{3}$.
(E) 585 .
(48th American High School Mathematics Examination, 1997)
[Solution] Since $8=2^{3}$, it is clear that $\log _{8} n$ is rational only when $n$ is a power of 2. Noting that $2^{0}<1997<2^{11}=2048$,
we have $\sum_{n=1}^{1997} f(n)=\sum_{k=0}^{1024} \log _{8} 2^{k}=\sum_{k=0}^{10} \frac{k}{3}=\frac{55}{3}$.
Therefore, the answer is $(C)$.