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.

The obvious minimum starting point would be the first eight Fibonacci numbers (or their reverse). I then tried adding one to the length until finding no further sequences. For a set of 12 there were 6 sequences (3 pairs, with reversals), and for a set of 13 there were 2 sequences (1 and its reverse). For 14 I got no hits. So the answer is: 13.

41 25 16 09 07 02 05 03 08 11 19 30 49 (or its reverse)

This is what computers are for -- the final test took all of 0.05 seconds of execution time!