4. Determine the values of the positive integer $n$ for which the following system of equations has a solution in positive integers $x_{1}, x_{2}, \ldots, x_{n}$. Find all solutions for each such $n$.
$$
\begin{aligned}
x_{1}+x_{2}+\cdots+x_{n} & =16 \\
\frac{1}{x_{1}}+\frac{1}{x_{2}}+\cdots+\frac{1}{x_{n}} & =1
\end{aligned}
$$
4. Without loss of generality, we may assume that $x_{1} \leq x_{2} \leq \cdots \leq x_{n}$. If $x_{1}=1$, then from (2), $n=1$ and (1) cannot be satisfied. Thus $x_{1} \geq 2$. If $x_{2}=2$, then $n=2$ and again (1) cannot be satisfied. Thus $x_{2} \geq 3$. Similarly, $x_{3} \geq 4$. Thus $x_{4}+\cdots+x_{n} \leq 7$ with $x_{4} \geq 4$. Thus $n \leq 4$.
(i) $n=1$ : No solution.
(ii) $n=2$ : The only solution of $\frac{1}{x_{1}}+\frac{1}{x_{2}}=1$ is $x_{1}=x_{2}=2$ which doesn't satisfy (1). Thus there is no solution.
(iii) $n=3$ : The only solutions of $\frac{1}{x_{1}}+\frac{1}{x_{2}}+\frac{1}{x_{3}}=1$ are $\left(x_{1}, x_{2}, x_{3}\right)=(2,3,6),(2,4,4)$ and $(3,3,3)$. They all do not satisfy (1).
(iv) $n=4$ : According to the discussion in the first paragraph, the solutions of $x_{1}+\cdots+x_{4}=16$ are
$$
\begin{aligned}
\left(x_{1}, x_{2}, x_{3}, x_{4}\right)= & (2,3,4,7),(2,3,5,6),(2,4,4,6),(2,4,5,5), \\
& (3,3,4,6),(3,3,5,5),(3,4,4,5),(4,4,4,4) .
\end{aligned}
$$

Only the last one satisfy (2).
Thus the system of equations has a solution only when $n=4$ and for this $n$, the only solution is $x_{1}=x_{2}=x_{3}=x_{4}=4$.