4. Given the sequence $\left\{a_{n}\right\}$, where $a_{1}=1, a_{2}=3, a_{n+1}=3 a_{n}-2 a_{n-1}$, the value of $a$ is ( ).
A. $2^{999}$
B. $2^{999}+1$
C. $2^{1000}$
D. $2^{1000}-1$
4. D.

Since $a_{n+1}=3 a_{n}-2 a_{n-1}$, we have $a_{n+1}-2 a_{n}=a_{n}-2 a_{n-1}=\cdots=a_{2}-2 a_{1}=1$, hence $a_{n}=2 a_{n-1}+1$, so $\left(a_{n}+1\right)=2\left(a_{n-1}+1\right)$, therefore $a_{n}+1=\left(a_{1}+1\right) 2^{n-1}=2^{n}$. Thus, $a_{1000}=2^{1000}-1$.