The integers from 1 to N (N>1) can be arranged in an order such that the sum of every pair of consecutive numbers is a prime.
For example, ( 4,1,2,3 ) OR (9, 8, 3, 4, 1, 2, 5, 6, 7, 10 ).
Prove it.
True but quite difficult.
Write the numbers {1,2,3,4} as a list. The method then is
1. Add the next number,A, at the beginning of the list if to do so would create a prime.
2. Failing 1, add A to the end of the list if to do so would create a prime.
3. Failing 1. and 2. deduct A from all the primes between A and 2A to get a second list {a,b,c,d..}. Find all the odd (or even) pairs in the first list corresponding to these numbers and that bracket a number which itself can be moved to the beginning or the end of the list.
4. Failing 1,2,and 3, find all the odd (or even) pairs in the first list corresponding to numbers in the second list that bracket a sequence of 3 numbers, two of which can be moved to the beginning and the end of the list (the third tags to one of the other two.
5. Failing 1 to 4, repeat with sequences of 5,7,9.. etc numbers; but no list of length up to 51 requires such large sequences.
It's sometimes said that there is always a prime between n and 2n, but in fact there are no less than about A^(1/2) such primes. So a match is always guaranteed if the above rules are followed, with minimal rehashing of the list for each new A as it is added. And since the numbers being moved as per 5 must be smaller than A, the opportunities for a match for those numbers is enhanced comparative to when they were first added to the list.
Edited on November 29, 2011, 12:21 am

Posted by broll
on 20111128 11:59:42 