15. A natural number $n$ is said to be lucky if $2^{-n}$ and $2^{-n-1}$ have the same number of significant figures when written in decimal notation. For example, 3 is lucky since $2^{-3}=0.125$ and $2^{-4}=0.0625$ have the same number of significant figures. On the other hand $2^{-5}=0.03125$ has one more significant figure than 0.0625 , so 4 is not lucky. Given that $\log 2=0.301$ (correct to 3 significant figures), how many lucky numbers are less than 2004 ?
(2 marks)
對於自然數 $n$, 若 $2^{-n}$ 和 $2^{-n-1}$ 兩數以十進制表示時有效數字的數目相同, 則 $n$ 稱為「幸運數」。例如 : $2^{-3}=0.125$ 和 $2^{-4}=0.0625$ 兩數中有效數字的數目相同, 因此 3 是幸運數。另一方面, 由於 $2^{-5}=0.03125$ 比 0.0625 多了一個有效數字, 所以 4 不是幸運數。已知 $\log 2=0.301$ (準確至 3 位有效數字），問有多少個幸運數小於 2004 ?
15. 603
15. Let $f(n)$ be the number of significant figures when $2^{-n}$ is written in decimal notation. Then $f(n)=f(n+1)$ when $n$ is 'lucky', and $f(n)+1=f(n+1)$ otherwise. Now $f(2)=2$, and we want to compute $f(2004)$. We first note that
$$
2^{-2004}=\frac{5^{2004}}{10^{2004}},
$$
so $f(2004)$ is equal to the number of digits of $5^{2004}$. Now
$$
\log 5^{2004}=2004(1-\log 2) \approx 2004 \times(0.7-0.001)=1402.8-2.004=1400.796,
$$
so $5^{2004}$ has 1401 digits. It follows that the number of lucky numbers less than 2004 is equal to $2004-1401=603$.