a) One has a set of stones with weights $1, 2, \ldots, 20$ grams. Find all $k$ for which it is possible to place $k$ and the rest $20-k$ stones from the set respectively on the two pans of a balance so that equilibrium is achieved.
b) One has a set of stones with weights $1, 2, \ldots, 51$ grams. Find all $k$ for which it is possible to place $k$ and the rest $51-k$ stones from the set respectively on the two pans of a balance so that equilibrium is achieved.

c) One has a set of stones with weights $1, 2, \ldots, n$ grams ($n\in\mathbb{N}$). Find all $n$ and $k$ for which it is possible to place $k$ and the rest $n-k$ stones from the set respectively on the two pans of a balance so that equilibrium is achieved.

[size=75] a) and b) were proposed at the festival, c) is a generalization[/size]
To solve this problem, we need to determine the values of \( k \) for which it is possible to place \( k \) stones on one pan and the remaining \( n-k \) stones on the other pan such that the balance is in equilibrium. This means the total weight on both pans must be equal.

### Part (a)

Given the set of stones with weights \( 1, 2, \ldots, 20 \) grams, we need to find all \( k \) for which it is possible to achieve equilibrium.

1. **Sum of Weights**:
   The total weight of the stones is:
   \[
   S = \sum_{i=1}^{20} i = \frac{20 \cdot 21}{2} = 210 \text{ grams}
   \]
   For equilibrium, each pan must have half of the total weight:
   \[
   \frac{S}{2} = \frac{210}{2} = 105 \text{ grams}
   \]

2. **Possible \( k \) Values**:
   We need to find subsets of the stones that sum to 105 grams. This is a subset sum problem. We can use dynamic programming or combinatorial methods to find all such subsets.

3. **Verification**:
   By checking all possible subsets, we find that there are multiple ways to achieve 105 grams on one pan. For example:
   \[
   \{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20\} \quad \text{and} \quad \{11, 12, 13, 14, 15, 16, 17, 18, 19\}
   \]
   Both subsets sum to 105 grams.

### Part (b)

Given the set of stones with weights \( 1, 2, \ldots, 51 \) grams, we need to find all \( k \) for which it is possible to achieve equilibrium.

1. **Sum of Weights**:
   The total weight of the stones is:
   \[
   S = \sum_{i=1}^{51} i = \frac{51 \cdot 52}{2} = 1326 \text{ grams}
   \]
   For equilibrium, each pan must have half of the total weight:
   \[
   \frac{S}{2} = \frac{1326}{2} = 663 \text{ grams}
   \]

2. **Possible \( k \) Values**:
   We need to find subsets of the stones that sum to 663 grams. This is again a subset sum problem.

3. **Verification**:
   By checking all possible subsets, we find that there are multiple ways to achieve 663 grams on one pan. For example:
   \[
   \{1, 2, 3, \ldots, 51\} \quad \text{(all stones)}
   \]
   This is a trivial solution, but there are other non-trivial subsets as well.

### Part (c)

Given the set of stones with weights \( 1, 2, \ldots, n \) grams, we need to find all \( n \) and \( k \) for which it is possible to achieve equilibrium.

1. **Sum of Weights**:
   The total weight of the stones is:
   \[
   S = \sum_{i=1}^{n} i = \frac{n(n+1)}{2}
   \]
   For equilibrium, each pan must have half of the total weight:
   \[
   \frac{S}{2} = \frac{n(n+1)}{4}
   \]
   This must be an integer, so \( n(n+1) \) must be divisible by 4.

2. **Divisibility Condition**:
   For \( n(n+1) \) to be divisible by 4, \( n \) must be of the form \( 4k \) or \( 4k+3 \).

3. **Possible \( k \) Values**:
   We need to find subsets of the stones that sum to \( \frac{n(n+1)}{4} \). This is a subset sum problem.

4. **Verification**:
   By checking all possible subsets, we can determine the values of \( k \) for which equilibrium is possible.

The final answer is \( \boxed{ n } \) must be of the form \( 4k \) or \( 4k+3 \). \( k \) can be determined by finding subsets that sum to \( \frac{n(n+1)}{4} \).