Find all possible arrangements of the numbers 1 to 15 in a sequence, where the sum of any two consecutive numbers is a perfect square.
Note that the number 8 can be neighboring only with the number 1, so it must be at one end of the sequence. The number 15 can be neighboring only with the numbers 1 and 10, so it either needs to be next to 1 or at the other end of the sequence. In either case, 10 should be next to it. The only other number that can be neighboring 10 is 6. Then 3 should follow, then 13 (since 1 is already taken), then 12, then 4, then 5, then 11, then 14, then 2, then 7, then 9. Since 1+9=10 is not a perfect square, we find that the only solutions are
and its reverse.