Initially, with 2023 odd count of -1’s, the product is -1. Target state (all +1) has product +1. Impossible. The solution is elegant, almost like a magic trick—but logical.
So ( n+1 ) divides ( n^2+1 ) exactly when ( n+1 ) divides 2. Thus ( n+1 \in {\pm 1, \pm 2} ), giving ( n \in {-3, -2, 0, 1} ). She checked each: all work. math olympiad problems and solutions
[ n^2 + 1 \div (n+1) = n-1 + \frac{2}{n+1}. ] Initially, with 2023 odd count of -1’s, the product is -1