Subjects number theory

Last Number

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Search Solutions

Last Number


1. **Problem statement:** We start with numbers 1, 2, 3, ..., 100 on the board. At each step, two numbers $a$ and $b$ are chosen and replaced by $|a - b|$. This continues until only one number remains. We want to find what the last remaining number must be. 2. **Key insight:** The operation replaces $a$ and $b$ by $|a - b|$. This operation affects the sum and parity of the numbers on the board. 3. **Consider parity:** Initially, the sum of numbers from 1 to 100 is $$\sum_{k=1}^{100} k = \frac{100 \times 101}{2} = 5050.$$ 4. **Sum parity:** Since 5050 is even, the sum is even. 5. **Effect of operation on parity:** When we replace $a$ and $b$ by $|a - b|$, the sum changes from $S$ to $$S' = S - (a + b) + |a - b|.$$ 6. **Rewrite $S'$:** Note that $$|a - b| = \max(a,b) - \min(a,b),$$ so $$S' = S - (a + b) + (\max(a,b) - \min(a,b)) = S - 2 \min(a,b).$$ 7. **Parity of $S'$:** Since $2 \min(a,b)$ is even, the parity of the sum $S'$ remains the same as $S$. 8. **Conclusion on parity:** The sum of the numbers on the board remains even after each operation. 9. **Final number:** When only one number remains, it must have the same parity as the sum, which is even. 10. **Can the final number be zero?** Yes, because if two equal numbers $a = b$ are chosen, $|a - b| = 0$ can appear. 11. **Is zero the only possible final number?** Yes, because the process can reduce numbers to zero, and the parity argument shows the final number must be even. **Final answer:** The last remaining number must be **0**.