4. From the 20 positive integers $1, 2, \cdots, 20$, each time take 3 numbers to form an ordered triplet $(a, b, c)$, such that $b$ is the mean proportional between $a$ and $c$. Then the number of different ordered triplets $(a, b, c)$ is $(\quad)$.
(A) 22
(B) 20
(C) 16
(D) 11
4.A.

Since $2^{2}=1 \times 4,3^{2}=1 \times 9,4^{2}=1 \times 16=2 \times 8$,
$$
\begin{array}{l}
6^{2}=2 \times 18=3 \times 12=4 \times 9,8^{2}=4 \times 16, \\
10^{2}=5 \times 20,12^{2}=9 \times 16=8 \times 18,
\end{array}
$$

and each equation generates two sets of ordered real number pairs $(a, b, c)$, so there are 22 pairs in total.