Determine all finite nonempty sets $S$ of positive integers satisfying
\[ {i+j\over (i,j)}\qquad\mbox{is an element of S for all i,j in S}, \]
where $(i,j)$ is the greatest common divisor of $i$ and $j$.
1. **Understanding the Problem:**
   We need to determine all finite nonempty sets \( S \) of positive integers such that for any \( i, j \in S \), the expression \(\frac{i+j}{(i,j)}\) is also an element of \( S \). Here, \((i,j)\) denotes the greatest common divisor (gcd) of \( i \) and \( j \).

2. **Initial Observations:**
   - If \( i = j \), then \(\frac{i+i}{(i,i)} = \frac{2i}{i} = 2\), which implies that \( 2 \in S \) if \( S \) contains any repeated element.
   - If \( i \neq j \), then \(\frac{i+j}{(i,j)}\) must be an integer and an element of \( S \).

3. **Lemma 1:**
   - Define \( f(i,j) = \frac{i+j}{(i,j)} \).
   - We need to check if \( f(i,j) \) is involutive, i.e., if \( f(i,j) = i \) or \( f(i,j) = j \).

4. **Case Analysis:**
   - **Case 1: \( \gcd(i,j) = 1 \):**
     - Here, \( f(i,j) = i + j \).
     - Since \( i \) and \( j \) are distinct, \( i + j \) is greater than both \( i \) and \( j \). This implies that \( S \) must contain larger elements, leading to an infinite set, which contradicts the finiteness of \( S \).

   - **Case 2: \( \gcd(i,j) = k > 1 \):**
     - Let \( i = k \cdot i' \) and \( j = k \cdot j' \) where \( \gcd(i', j') = 1 \).
     - Then, \( f(i,j) = \frac{k(i' + j')}{k} = i' + j' \).
     - Since \( i' \) and \( j' \) are coprime, \( i' + j' \) must be an element of \( S \).

5. **Finite Set Construction:**
   - Consider \( S = \{ n \} \) for any positive integer \( n \). This trivially satisfies the condition since there are no distinct pairs \( i, j \) to consider.
   - Consider \( S = \{ n, n(n-1) \} \) for \( n > 2 \):
     - For \( i = n \) and \( j = n(n-1) \), we have \( \gcd(n, n(n-1)) = n \).
     - Then, \( f(n, n(n-1)) = \frac{n + n(n-1)}{n} = \frac{n^2}{n} = n \).
     - This implies \( n \in S \), which is already true.

6. **Verification:**
   - For \( S = \{ n \} \), the condition is trivially satisfied.
   - For \( S = \{ n, n(n-1) \} \), the condition is satisfied as shown above.

7. **Conclusion:**
   - The only finite nonempty sets \( S \) that satisfy the given condition are of the form \( S = \{ n \} \) and \( S = \{ n, n(n-1) \} \) for \( n > 2 \).

The final answer is \( \boxed{ S = \{ n \} } \) or \( S = \{ n, n(n-1) \} \) for \( n > 2 \).