Problem
Jessy writes the numbers from $1$ to $2019$ on a board. She then chooses any two of the written numbers, erases them and adds the difference of the two chosen numbers to the list. She continues doing this until she ends up with a single number. Is it possible that she ends up with $1209$?
My observation
I tried to find the result for the following smaller cases:
- For $1$ to $4$, we end up with an even number.
- For $1$ to $5$, we end up with an odd number.
- For $1$ to $6$, we end up with an odd number.
- For $1$ to $7$, we end up with an even number.
- For $1$ to $10$ we end up with an odd number.
Thus I claim the following:
- For numbers $1$ to $n$, we always end up with either an odd or an even number.
- For numbers $1$ to $n$, we end up with an even number if $\lceil{\frac{n}{2}}\rceil$ is even. Otherwise we end up with an odd number.
But I couldn't prove the claims. Are they correct? If so, how to prove that?
Extension
For numbers $1$ to $10$, I noticed that we can't end up with an odd number greater than $5$ (I made a mistake as we can reach all odd number less than or equal to $9$). So, I have the following questions:
- Can we end up with all odd or all even numbers for numbers $1$ to $n$?
- Assume that we may end up with the number $k$ ($1 \leq k \leq n$). In how many ways we can do that? Is this the same for all $k$?
As Calvin suggested, I'm providing a detail on Extension 2.
Detail on Extension 2: For numbers $1$ to $5$, we can reach $3$ in some ways. Here are two of them:
$$[1,2] \rightarrow 1, [4,5] \rightarrow 1, [1,1] \rightarrow 0, [3,0] \rightarrow 3$$
$$[1,5] \rightarrow 4, [3,4] \rightarrow 1, [2,1] \rightarrow 1, [4,1] \rightarrow 3$$
So, how many ways we can reach a number $k$?
Edit: @Parcly Taxel suggested a similar question. So, I got answer for the problem and Extension $1$. I currently need an answer for Extension $2$.
Hint $$ 1+2+...+2019 \mbox{ is even } $$
Now, if the two numbers are $a>b$ she subtracts $a+b$ from the sum and adds instead $a-b$. What happens with the parity of the sum when she does this?
Note The following process allows you, for $n \geq 7$ to end up with any number between $1$ and $n$ of same parity as the sum.
First fix your desired number $1 \leq k \leq n$. Next, group the remaining numbers in pairs $(1,2),(3,4),...,(n-1,n)$ when $n$ is odd and $(2,3),(4,5),..(n-1,n)$ when $n$ is even. Note that one pair may be $(k-1,k+1)$.
Replace each pair by its difference. After this, you are left on the board with $k$, possibly a $2$ and at least 2 ones. If there is a 2 on the board, pair $(2,1)$ and erase it. After this you'll have on the board a $k$ and an even number of ones.
Pair the 1's to make them zeroes, and then use $(k,0)\to k$.