Arrange the numbers from 1 to 15 in such an order that any two consecutive numbers in the sequence add up to a perfect square.
(In reply to
Solution by Medicherla)
Ive noticed a pattern in that solution that leads me to suspect ii (or its reflection  the same sequence backward from 9 to 8) is the only possible solution.
Every even pair (A pair is even in the sense I mean here if the first number is in an evennumbered position in the sequence  1, 15 is an even pair because 1 is in the second position in the sequence.) adds to 16, while the odd pairs add alternately to 9 or 25.
building the sequence then becomes a simple matter: 1 Choose a number
2 Subtract the number from 16. This becomes the second number.
3 Subtect the smaller numer from 9 and place the third number next to that smaller number.
4 Subtect the largerr numer from 25 and place the third number next to that larger number.
5 Subtract each of the new numbers from 16 to add another number to each end.
6 Repeat steps 3 5 until...
When you get to 91=8, you can go no further because 168=8 and you will start repeating the sequence.
On the other end, when you get to 167=9, you can go no further because 259=16 which is beyond the allowable range. (Likewise, 99=0, also out of bounds.)
The example of 9 shows that any of the numbers can be part of at most 2 pairs in the 9,16,25 range. Since 1+2=3>1 and 14+15=29<36, there are no other square numbers a pair can add to

Posted by TomM
on 20030115 07:45:41 