6. Using 1 yuan and 2 yuan bills to pay 2005 yuan, there can be ( ) ways to pay.
A. 1000
B. 1001
C. 1002
D. 1003
6. D Let $a_{r}$ denote the number of all payment methods for $r$ yuan, then the generating function of $\left\{a_{r}\right\}$ is $f(t)=\frac{1}{(1-t)\left(1-t^{2}\right)}($ conclusion from Example 6 $)=\frac{1}{2(1-t)^{2}}+\frac{1}{4(1-t)}+\frac{1}{4(1+t)}=\sum_{n=0}^{\infty}\left[\frac{n+1}{2}+\frac{1}{4}+\frac{(-1)^{n}}{4}\right] t^{n}$. Therefore, $a_{r}=\left\{\begin{array}{ll}\frac{r+1}{2}, & r \text { is odd. } \\ \frac{r+2}{2}, r \text { is even }\end{array}\right.$ In particular, $a_{2005}=1003$