4. For positive integer $n$, let $D(n)$ be the eventual value obtained when the digits of $n$ (in base 10) are added up recursively until a one-digit number is obtained. For example $D(4)=4, D(2012)=D(5)=5$ and $D(1997)=D(26)=D(8)=8$. If $x$ denotes the 2012th Fibonacci number (i.e. the 2012th term of the sequence 1, 1, 2, $3,5,8,13, \ldots)$, find $D(x)$.
(1 mark)
對於正整數 $n$, 設 $D(n)$ 表示不斷迭代計算 $n$ 的數字之和直至得到一個一位數的最終結果, 例如: $D(4)=4$ 、 $D(2012)=D(5)=5$ 、 $D(1997)=D(26)=D(8)=8$ 。若 $x$ 表示第 2012 個斐波那契数（即數列 $1,1,2$, $3,5,8,13, \ldots$ 的第 2012 項）, 求 $D(x)$ 。
4. 6
4. Since a positive integer leaves the same remainder as its sum of digits when divided by 9 , $D(x)$ is simply the remainder when $x$ is divided by 9 . In other words, the answer is simply the remainder when $F_{2012}$ (where $F_{n}$ is the $n$-th Fibonacci number) is divided by 9 .
We compute the 'modulo 9 Fibonacci sequence' (i.e. the remainders when terms of the Fibonacci sequence are divided by 9 ): we get $1,1,2,3,5,8,4,3,7,1,8,9,8,8,7,6,4,1,5,6$, $2,8,1,9$, after which the next two terms are 1,1 and hence the sequence will repeat every 24 terms. Since $2012 \equiv 20(\bmod 24)$, we have $F_{2012} \equiv F_{20} \equiv 6(\bmod 9)$.