13. (15 points) In the sequence $\left\{a_{n}\right\}$, $a_{n}=2^{n} a+b n-80\left(a, b \in \mathbf{Z}_{+}\right)$.
It is known that the minimum value of the sum of the first $n$ terms $S_{n}$ is obtained if and only if $n=6$, and $7 \mid a_{36}$. Find the value of $\sum_{i=1}^{12}\left|a_{i}\right|$.
Three, 13. Notice that, $\left\{a_{n}\right\}$ is an increasing sequence.
From the given, $a_{6} > 0$, which means
$$
64 a + 6 b - 800 \text{. }
$$

Combining $a, b \in \mathbf{Z}_{+}$, we get
$a=1, b=1$ or 2.
$$
\begin{array}{l}
\text{Also, } a_{36}=2^{36} + 36 b - 80 \\
\equiv 1 + b - 3 \equiv 0 (\bmod 7).
\end{array}
$$

Thus, $b=2$.
$$
\begin{array}{l}
\text{Therefore, } a_{n}=2^{n} + 2 n - 80 \text{. } \\
\text{Hence, } \left|a_{1}\right| + \left|a_{2}\right| + \cdots + \left|a_{12}\right| \\
= -\left(a_{1} + a_{2} + \cdots + a_{6}\right) + \left(a_{7} + a_{8} + \cdots + a_{12}\right) \\
= S_{12} - 2 S_{6} = 8010.
\end{array}
$$