Arrange the numbers 1 to 15 inclusively in a straight line in such a way that any two adjacent numbers add up to a perfect square.
*** Disregard reflections.
Write down pairs that sum to squares
1+3=4
1+8=2+7=3+6=4+5
1+15=2+14=3+13=4+12=5+11=6+10=7+9
10+15=11+14=12+13
Note that 8 and 9 appear just once, so they must be the ends. The must be the endpoints.
Only 1 and 3 appear thrice so there will only be one or two decision points.
Solution:
9,7,2,14,11,5,4,12,13,3,6,10,15,1,8
|
Posted by Jer
on 2013-05-20 12:29:32 |