3. Let $S=\{1,2, \cdots, 2005\}$. If any set of $n$ pairwise coprime numbers in $S$ contains at least one prime number, find the minimum value of $n$.


3. First, we have $n \geqslant 16$. In fact, take the set $A_{0}=\left\{1,2^{2}, 3^{2}, 5^{2}, \cdots, 41^{2}, 43^{2}\right\}$, then $A_{0} \subseteq S$, $\left|A_{0}\right|=15, A_{0}$ contains any two numbers that are coprime, but there are no primes in it, which shows that $n \geqslant 16$.
Second, we prove: For any $A \subseteq S, n=|A|=16, A$ contains any two numbers that are coprime, then $A$ must contain a prime number.
Using proof by contradiction, assume that $A$ contains no prime numbers. Let $A=\left\{a_{1}, a_{2}, \cdots, a_{16}\right\}, a_{1}2005$, a contradiction.
(2) If $1 \in A$, then without loss of generality, let $a_{16}=1, a_{1}, \cdots, a_{15}$ are all composite numbers, similarly as in (1), we have $a_{1} \geqslant p^{2} \geqslant 2^{2}, a_{2} \geqslant p_{2}^{2} \geqslant 3^{2}, \cdots, a_{15} \geqslant p_{5}^{2} \geqslant 47^{2}>2005$, a contradiction.
From (1) and (2), we know that the assumption is not valid, thus $A$ must contain a prime number, i.e., when $n=|A|=16$ the conclusion holds.
In summary, the minimum value of $n$ is 16.