There are $ n \ge 3$ coins on a circle. Consider a coin and the two coins adjacent to it; if there are an odd number of heads among the three, we call it [i]good[/i]. An operation consists of turning over all good coins simultaneously. Initially, exactly one of the $ n$ coins is a head. The operation is repeatedly performed.
(a) Prove that if $ n$ is odd, the coins will never be all-tails.
(b) For which values of $ n$ is it possible to make the coins all-tails after several operations? Find, in terms of $ n$, the number of operations needed for this to occur.
Let's break down the problem and solution into detailed steps.

### Part (a): Prove that if \( n \) is odd, the coins will never be all-tails.

1. **Initial Configuration**:
   - We start with exactly one head and \( n-1 \) tails. Let's denote the coins as \( a_0, a_1, \ldots, a_{n-1} \) in a circle, where \( a_i \) can be either \( H \) (head) or \( T \) (tail).
   - Without loss of generality, assume \( a_0 = H \) and \( a_1, a_2, \ldots, a_{n-1} = T \).

2. **Definition of Good Coin**:
   - A coin is called *good* if it and its two adjacent coins have an odd number of heads.

3. **Operation**:
   - In each operation, all good coins are flipped simultaneously.

4. **Parity Argument**:
   - Consider the parity (odd or even) of the number of heads. Initially, there is exactly one head, so the number of heads is odd.
   - Each operation flips an odd number of heads (since each good coin is surrounded by an odd number of heads). Flipping an odd number of heads changes the parity of the total number of heads.

5. **Invariant**:
   - The parity of the number of heads is invariant under the operation. Since we start with an odd number of heads, the number of heads will always remain odd after any number of operations.

6. **Conclusion**:
   - Since the number of heads is always odd, it is impossible to reach a configuration where all coins are tails (which would mean zero heads, an even number).

\[
\blacksquare
\]

### Part (b): For which values of \( n \) is it possible to make the coins all-tails after several operations? Find, in terms of \( n \), the number of operations needed for this to occur.

1. **Even \( n \)**:
   - If \( n \) is even, we can potentially reach an all-tails configuration. Let's explore this possibility.

2. **Initial Configuration**:
   - Start with one head and \( n-1 \) tails. Assume \( a_0 = H \) and \( a_1, a_2, \ldots, a_{n-1} = T \).

3. **Operation Analysis**:
   - In each operation, we flip all good coins. A coin is good if it and its two neighbors have an odd number of heads.

4. **Pattern Formation**:
   - For even \( n \), we can form a pattern where heads and tails alternate in such a way that eventually all coins can be flipped to tails.

5. **Example for \( n = 4 \)**:
   - Initial: \( H, T, T, T \)
   - After 1st operation: \( T, H, T, T \)
   - After 2nd operation: \( T, T, H, T \)
   - After 3rd operation: \( T, T, T, H \)
   - After 4th operation: \( T, T, T, T \)

6. **General Case for Even \( n \)**:
   - For even \( n \), we can always find a sequence of operations that will eventually lead to all coins being tails. The exact number of operations depends on the specific configuration and sequence of flips, but it is always possible.

\[
\boxed{n \text{ is even}}
\]