3. 1. 12 ** Given the sequence $a_{k}=2^{k}, k=1,2, \cdots, n$. Find the sum of all possible products $a_{i} a_{j}(1 \leqslant$ $i \leqslant j \leqslant n)$.
Given $a_{i} a_{j}=2^{i+j}(1 \leqslant i \leqslant j \leqslant n)$, represent these numbers in the following table form:
$$
\begin{array}{ccccc}
2^{1+1} & 2^{1+2} & 2^{1+3} & \cdots & 2^{1+n} \\
& 2^{2+2} & 2^{2+3} & \cdots & 2^{2+n} \\
& & 2^{3+3} & \cdots & 2^{3+n} \\
& & & \ddots & \vdots \\
& & & & 2^{n+n}
\end{array}
$$

Complete this table symmetrically along the main diagonal to form an $n \times n$ table:
$$
\begin{array}{ccccc}
2^{1+1} & 2^{1+2} & 2^{1+3} & \cdots & 2^{1+n} \\
2^{2+1} & 2^{2+2} & 2^{2+3} & \cdots & 2^{2+n} \\
2^{3+1} & 2^{3+2} & 2^{3+3} & \cdots & 2^{3+n} \\
\vdots & \vdots & \vdots & & \vdots \\
2^{n+1} & 2^{n+2} & 2^{n+3} & \cdots & 2^{n+n}
\end{array}
$$

The sum of the first row is
$$
S_{1}=2^{2}+2^{3}+\cdots+2^{n+1}=2^{2}\left(2^{n}-1\right),
$$

The sum of the second row is $S_{2}=2 S_{1}=2^{3}\left(2^{n}-1\right) \cdots \cdots$ The sum of the $n$-th row is $S_{n}=2^{n+1}\left(2^{n}-1\right)$. Let the desired sum be $S$, then
$$
\begin{aligned}
2 S & =S_{1}+S_{2}+\cdots+S_{n}+\left(2^{1+1}+2^{2+2}+\cdots+2^{n+n}\right) \\
& =\left(2^{n}-1\right)\left(2^{2}+2^{3}+\cdots+2^{n+1}\right)+\left(2^{2}+2^{4}+\cdots+2^{2 n}\right) \\
& =2^{2}\left(2^{n}-1\right)^{2}+\frac{4\left(4^{n}-1\right)}{3},
\end{aligned}
$$

Thus, $S=2\left(2^{n}-1\right)^{2}+\frac{2}{3}\left(2^{2 n}-1\right)=\frac{4}{3}\left(2^{n}-1\right)\left(2^{n+1}-1\right)$.