I give you a pen and paper and ask you to write the numbers from 1 to 100 in succession so that there are no three numbers such that twice the second one is equal to the sum of the first and the third one. The three numbers do not need to be successive in the sequence.

*Remark: The sequence **3, 1, 2, 5, 4** works, but the sequence **1, 4, 2, 5, 3** does not because of the numbers **1**, **2**, and **3**.*

**SOLUTION**

Start with the following sequences:

**1** → **1, 2** → **2, 4, 1, 3** → **4, 8, 2, 6, 3, 7, 1, 5** → **8, 16, 4, 12, 6, 14, 2, 10, 7, 15, 3, 11, 5, 13, 1, 9**

and keep iterating until you get a sequence with all numbers from 1 to 128. On each step you take the previous sequence, multiply all elements by 2, and then add the same result but with all elements decreased by 1. This will ensure that the first half contains only even numbers and the second half contains only odd numbers. Since the sum of an odd and an even number is not divisible by 2, if some sequence violates the property, then the previous sequence would have violated it as well.

Once you construct a sequence with 128 numbers, simply remove the numbers from 101 to 128 and you are done. To speed up the process, you can reduce the sequence **8, 16, 4, 12, 6, 14, 2, 10, 7, 15, 3, 11, 5, 13, 1, 9** to **8, 4, 12, 6, 2, 10, 7, 3, 11, 5, 13, 1, 9** and then continue the process.

I would write the statement ” the numbers from 1 to 100 in succession so that there are no three numbers such that twice the second one is equal to the sum of the first and the third one.” because that is what they were telling me to write.

There’s a much less complicated/convoluted solution… just take all the numbers in order from 1 to 100 and swap every 2. That is 2,1, 4,3, 6,5, 8,7, 10,9, … etc

Thank you for the comment Pew. Unfortunately, this solution does not work, since the three numbers do not need to be consecutive in the sequence. For example, 2, 4, 6, 8, etc. form an arithmetic progression and their indexes in the sequence are increasing.