Five Points, Ten Distances

Five points, A, B, C, D, and E, lie on a line. The distances between them in ascending order are: 2, 5, 6, 8, 9, X, 15, 17, 20, and 22. What is X?

We assume that the points are ordered A to E from left to right. We have AE = 22 and either AD = 20, BE = 17, or AD = 17, BE = 20. Without loss of generality AD = 20, BE = 17, and therefore AB = 5, BD = 15, DE = 2. The distance of 6 is associated with either BC or CD, and therefore the points are arranged in one of these two ways:

  1. AB = 5, BC = 6, CD = 9, DE = 2
  2. AB = 5, BC = 9, CD = 6, DE = 2

If it is the latter, we get the sequence of distances: 2, 5, 6, 9, 11, 14, 15, 17, 20, 22, which does not fit the provided sequence.

If it is the former, we get the sequence of distances: 2, 5, 6, 8, 9, 14, 15, 17, 20, 22, and therefore X = 14.

Perfect Square Sums

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

8-1-15-10-6-3-13-12-4-5-11-14-2-7-9

and its reverse.