How many numbers, from 1 to 50 (both included) can you arrange in a row (one of each) so that each one, except the first and the last, is the sum or difference of its two neighbours?
Example: 3, 10, 7, 17, 24, 41.
10 = 3+7, 7 = 17-10, 17 = 24-7, 24 = 41-17.
After posting I looked at Charlie's and found that we came to the same unique solution. I used 13 imbedded loops (after starting with smaller sets) varying each variable from 1 to 50, in each testing that the variable had not been used already, and then testing that all numbers from the second thru the second to last were equal to the absolute value of either the sum or the difference of the surrounding values. Since I worked from left to right, each solution set contained a sequence and its reverse. The logic was easy to expand by adding and testing an additional variable. Congrats, on beating me to it again!