On a board the numbers $(n-1, n, n+1)$ are written where  $n$ is positive integer. On a move choose 2 numbers $a$ and $b$, delete them and write $2a-b$ and $2b-a$. After a succession of moves, on the board there are 2 zeros. Find all possible values for $n$.
Proposed by Andrei Eckstein
**
   - Let $E$ be the number of endpoint moves performed initially.
   - After $E$ endpoint moves, the triple becomes:
     \[
     (a_E, b_E, c_E) = (n - 3^E, n, n + 3^E)
     \]

6. **Case 1: $a_E \leq 0$:**
   - If $a_E = 0$, then all further moves are right moves.
   - This implies $n = 3^E$.
   - Transforming:
     \[
     (a_E, b_E, c_E) = (0, 3^E, 2 \cdot 3^E) \quad \text{to} \quad (a_{E+1}, b_{E+1}, c_{E+1}) = (0, 0, 3^{E+1})
     \]

7. **Case 2: $a_E > 0$:**
   - By Claim 1 with $D = 3^E$, the values of the triple's terms after the $E$-th move will remain constant modulo $3^E$.
   - If they are not zero, they will never reach zero modulo $3^E$.
   - Therefore, $D$ must divide $n$.
   - Let $n = 3^E \cdot k$:
     \[
     (a_E, b_E, c_E) = (3^E \cdot (k-1), 3^E \cdot k, 3^E \cdot (k+1))
     \]
   - Divide by $3^E$:
     \[
     (a_k', b_k', c_k') = \left(\frac{a_k}{3^E}, \frac{b_k}{3^E}, \frac{c_k}{3^E}\right)
     \]
   - The next move cannot be an endpoint move, it must be a left or right move.

8. **Left Move:**
   - The triple $(k-1, k, k+1)$ becomes $(k-2, k+1, k+1)$.
   - Let $k = 3l + 2$ and divide by $3$:
     \[
     (l, l+1, l+1)
     \]
   - By Claim 2, this triple cannot have $(0, 0, N)$ as its descendant.

9. **Right Move:**
   - The triple $(k-1, k, k+1)$ becomes $(k-1, k-1, k+2)$.
   - Let $k = 3l + 1$ and divide by $3$:
     \[
     (l, l, l+1)
     \]
   - By Claim 2, this triple cannot have $(0, 0, N)$ as its descendant.

Thus, the only possible values for $n$ are powers of $3$.

The final answer is $\boxed{3^k}$.