1. **Case for n=1:**
- If n=1, we need to find a set A such that for any a1∈A, the number a1 is coprime with itself. This is impossible because any number is not coprime with itself. Hence, there is no such set A for n=1.
2. **Case for n≥2:**
- We need to construct an infinite set A of positive integers such that for any n pairwise distinct numbers a1,a2,…,an∈A, the sum a1+a2+…+an and the product a1⋅a2⋅…⋅an are coprime.
3. Choosing primes:
- Let p1 be a prime number greater than n.
- For i≥2, choose pi such that:
pi≡1(modp1⋅p2⋯pi−1)andpi>p1+p2+⋯+pi−1+n
By Dirichlet's theorem on arithmetic progressions, such primes pi exist.
4. **Constructing the set A:**
- Let A={p1,p2,p3,…}.
5. Verifying the coprimality condition:
- Consider any n pairwise distinct numbers q1,q2,…,qn∈A with q1<q2<⋯<qn.
- Assume there exists a prime r such that r divides both q1+q2+⋯+qn and q1⋅q2⋅⋯⋅qn.
- Since r divides q1⋅q2⋅⋯⋅qn, r must be one of the qi, say r=qt for some t∈{1,2,…,n}.
6. Deriving a contradiction:
- Since qt divides q1+q2+⋯+qn, we have:
qt∣q1+q2+⋯+qt−1+qt+1+⋯+qn
- Given the construction of pi, we have qt+1≡qt+2≡⋯≡qn≡1(modqt).
- Therefore, qt∣q1+q2+⋯+qt−1+(n−t).
7. **Bounding qt:**
- Let Qt={x∈A:x<qt}. Clearly, q1,q2,…,qt−1∈Qt.
- By construction, qt>(sum of the elements of Qt)+n≥q1+q2+⋯+qt−1+n.
- This implies qt>q1+q2+⋯+qt−1+(n−t), which contradicts the earlier condition that qt∣q1+q2+⋯+qt−1+(n−t).
8. Conclusion:
- The contradiction implies that no such prime r exists, and thus q1+q2+⋯+qn and q1⋅q2⋅⋯⋅qn are coprime.
The final answer is all positive integers except n=1.