(4) Let the sequence $\left\{a_{n}\right\}$ satisfy: $a_{1}=2, a_{n+1}=1-\frac{1}{a_{n}}$, and let the product of the first $n$ terms of the sequence $\left\{a_{n}\right\}$ be $P_{n}$, then the value of $P_{2009}$ is ( ).
(A) $-\frac{1}{2}$
(B) -1
(C) $\frac{1}{2}$
(D) 1
(4) B Hint: Since
$$
a_{n+2}=1-\frac{1}{a_{n+1}}=1-\frac{1}{1-\frac{1}{a_{n}}}=\frac{-1}{a_{n}-1},
$$

then
$$
a_{n+3}=1-\frac{1}{a_{n+2}}=1-\frac{1}{\frac{-1}{a_{n}-1}}=a_{n},
$$

thus $\left\{a_{n}\right\}$ is a periodic sequence with a period of 3.
Given $a_{1}=2, a_{2}=\frac{1}{2}, a_{3}=-1$, hence $P_{3}=-1$, so,
$$
P_{2009}=(-1)^{669} P_{2}=-1 .
$$