20. Several 1s and 2s are arranged in a row:
$$
1,2,1,2,2,1,2,2,2,1,2, \cdots
$$

The rule is: The 1st number is 1, the 2nd number is 2, the 3rd number is 1. Generally, first write a row of 1s, then insert $k$ 2s between the $k$-th 1 and the $(k+1)$-th 1 ($k=1,2$, $\cdots$). Try to answer:
(1) Is the 2005th number 1 or 2?
(2) What is the sum of the first 2005 numbers?
(3) What is the sum of the pairwise products of the first 2005 numbers?
20. (1) Divide the sequence of numbers into $n$ groups:

These $n$ groups have a total of $1+2+\cdots+n=\frac{1}{2} n(n+1)$ numbers.
When $n=62$, there are 1953 numbers;
When $n=63$, there are 2016 numbers.
It is clear that the 2005th number is in the 63rd group, and it is not the last number in that group, so the 2005th number is 2.
Note: A correct answer without the process earns only 2 points.
(2) In the first 2005 numbers, there are 62 ones and $2005-62$ $=1943$ twos. Therefore, the sum of the first 2005 numbers is
$$
62 \times 1+1943 \times 2=3948 \text {. }
$$
(3) Let's denote these 2005 numbers as $a_{1}, a_{2}, \cdots, a_{2005}$. Their sum is $R$, the sum of their squares is $T$, and the sum of their pairwise products is $S$. Then
$$
\begin{aligned}
R & =a_{1}+a_{2}+\cdots+a_{2005}=3948, \\
T & =a_{1}^{2}+a_{2}^{2}+\cdots+a_{2005}^{2} \\
= & 62 \times 1^{2}+1943 \times 2^{2}=7834, \\
S= & a_{1} a_{2}+a_{1} a_{3}+\cdots+a_{1} a_{2005}+a_{2} a_{3}+a_{2} a_{4}+ \\
& \cdots+a_{2} a_{2005}+\cdots+a_{2004} a_{2005} .
\end{aligned}
$$

Thus, $2 S=a_{1} a_{2}+a_{1} a_{3}+\cdots+a_{1} a_{2005}+a_{2} a_{1}+$
$$
\begin{array}{l}
\quad a_{2} a_{3}+\cdots+a_{2} a_{2005}+\cdots+a_{2005} a_{1}+ \\
\quad a_{2005} a_{2}+\cdots+a_{2005} a_{2004} . \\
=\left(a_{1}+a_{2}+\cdots+a_{2005}\right)^{2}-\left(a_{1}^{2}+a_{2}^{2}+\cdots+a_{2005}^{2}\right) \\
=R^{2}-T=3948^{2}-7834 .
\end{array}
$$

Therefore, $S=\frac{1}{2}\left(3948^{2}-7834\right)=7789435$.
Thus, the required sum is 7789435.
(Provided by Yu Yunzhong)