How does this op amp circuit with adjustable gain work?
When the potentiometer is at max:


$$
v_+ = v_- =v_i \rightarrow \frac{v_-}{nR/(n-1)}=\frac{v_o-v_-}{nR}\rightarrow v_o=n\ v_i \rightarrow A_v=n
$$


When the potentiometer is at min:


$$
v_+ = v_- = 0 \rightarrow \frac{v_i-v_-}{R}=\frac{v_--v_o}{nR}\rightarrow v_o=-n\ v_i \rightarrow A_v=-n
$$

Conclusion: \$-n \leq Av \leq n\$.