LogicalAndReasoning TrialAndError Intermediate

Problem - 3935
Take a list of positive integers $1$, $2$, $3$, $\cdots$, $2017$. At each step, pick up two of the numbers on the list, say $a$ and $b$, cross them out and replace them by the single number $(ab+a+b)$. Keep doing this until only a single number is left. What is (are) the possible value(s) of this last number?

Answer     $2018!-1$

The answer is $\boxed{2018!-1}$. Let's start by examining the case containing three numbers: $x$, $y$, and $z$. Removing $x$ and $y$ leaves two numbers $(xy+x+y)$ and $z$. Therefore the final number is $$(xy+x+y)z+(xy+x+y) + z = xyz+xy+yz+zx+x+y+z=(x+1)(y+1)(z+1)-1$$ The fact that the result is symmetric means the sequence of removing which numbers first is irrelevant. It can also be shown that for four numbers $x$, $y$, $z$, and $w$, the final result is $$(x+1)(y+1)(z+1)(w+1)-1$$ Therefore the answer to the original problem is $$(1+1)(2+1)\cdots(2017+1)-1=2018!-1$$

report an error