3. Given a non-constant sequence $\left\{a_{i}\right\}$, satisfying $a_{i+1}^{2}-a_{i} a_{i+1}+a_{i}^{2}$ $=0$, and $a_{i+1} \neq a_{i-1}, i=0,1,2, \cdots, n$. For a given natural number $n, a_{1}=a_{n+1}=1$, then $\sum_{i=0}^{n-1} a_{i}$ equals ( ).
(A) 2
(B) -1
(C) 1
(D) 0
$2, \cdots, n$, so, $a_{i+1}+a_{i-1}=a_{i}, i=1,2, \cdots, n$. Thus we get
$$
\begin{array}{l}
a_{0}=a_{1}-a_{2}, \\
a_{1}=a_{2}-a_{3}, \\
\ldots \ldots .
\end{array}
$$
$$
\begin{array}{l}
a_{n-2}=a_{n-1}-a_{n}, \\
a_{n-1}=a_{n}-a_{n+1} .
\end{array}
$$

Therefore, $\sum_{i=0}^{n-1} a_{i}=a_{1}-a_{n+1}=0$.