3. Given $f(x)=\log _{\frac{1}{3}}\left(3^{x}+1\right)+\frac{1}{2} a b x$ is an even function, $g(x)=2^{x}+\frac{a+b}{2^{x}}$ is an odd function, where $a 、 b \in \mathbf{C}$. Then $a+a^{2}+a^{3}+\cdots+a^{2000}+b+b^{2}$ $+b^{3}+\cdots+b^{2000}=$
3. -2 .

From the known $f(-x)=f(x), g(-x)=-g(x)$ we get
$$
\begin{array}{l}
\log _{\frac{1}{3}}\left(3^{-x}+1\right)-\frac{1}{2} a b x \\
=\log _{\frac{1}{3}}\left(3^{x}+1\right)+\frac{1}{2} a b x . \\
2^{-x}+\frac{a+b}{2^{-x}}=-\left(2^{x}+\frac{a+b}{2^{x}}\right) .
\end{array}
$$

Simplifying, from equation (1) we get $a b=1$, and from equation (2) we get $a+b=-1$. Therefore, $a$ and $b$ are a pair of conjugate complex roots of the equation $x^{2}+x+1=0$, which are the imaginary cube roots of 1. Then
$$
\begin{aligned}
a & +a^{2}+a^{3}+\cdots+a^{1999}+a^{2000}+b+b^{2} \\
& +b^{3}+\cdots+b^{1999}+b^{2000} \\
= & a^{1999}+a^{2000}+b^{1999}+b^{2000} . \\
= & a+a^{2}+b+b^{2}=-1-1=-2 .
\end{aligned}
$$