18. Given the function $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$ are constants, then $\sum_{k=1}^{2008}\left(a^{k}+b^{k}\right)$ is $\qquad$.
18. Fill in 1. Reason: From $f(-x)=f(x)$ and $g(-x)=-g(x)$, we have $\log _{\frac{1}{3}}\left(3^{-x}+1\right)-\frac{1}{2} a b=\log _{\frac{1}{3}}\left(3^{x}+1\right)+\frac{1}{2} a b x$ and $2^{-x}+\frac{a+b}{2^{-x}}=-2\left(2^{x}+\frac{a+b}{2^{x}}\right)$, which implies $a b=1$ and $a+b=-1$.

Thus, $a$ and $b$ are the roots of the function $f(t)=t^{2}+t+1$, i.e., $a^{2}+a+1=0, b^{2}+b+1=0$. Noting the combination of every three consecutive terms, we get $\sum_{k=1}^{2008}\left(a^{k}+b^{k}\right)=a+\left(a^{2}+a^{3}+a^{4}\right)+\cdots+\left(a^{2006}+a^{2007}+a^{2008}\right)+b+\left(b^{2}+b^{3}+b^{4}\right)+\cdots+$ $\left(b^{2006}+b^{2007}+b^{2008}\right)=a+b=-1$.