Question 1
Context: Look at the following numbers: 3 6 10 15 1. They are arranged such that each pair of adjacent numbers adds up to a square: , , , .
Q. Try arranging the numbers 1 to 17 (without repetition) in a row in a similar way — the sum of every adjacent pair of numbers should be a square. Can you arrange them in more than one way? If not, can you explain why?

- We need to arrange all integers from to without repetition in a single row such that the sum of every pair of adjacent numbers is a perfect square.
- The minimum possible sum of two distinct numbers is and the maximum sum is .
- The possible square sums in this range are and .
- By mapping all valid connections (pairs summing to a square), numbers with only connection must be placed at the ends of the row. We then trace a single path that visits every number from to exactly once.
Step 1 · Identify Possible Square Sums
The smallest sum of two distinct numbers is , and the largest sum is .
Perfect squares between and are:
Thus, the possible square sums are and .
Step 2 · List Valid Pairs and Map Connections
List all pairs of numbers from to that sum to a perfect square:
- For sum :
- For sum :
- For sum :
- For sum :
Connections (neighbours) for each number:
- 1: (3 connections)
- 2: (2 connections)
- 3: (3 connections)
- 4: (2 connections)
- 5: (2 connections)
- 6: (2 connections)
- 7: (2 connections)
- 8: (2 connections)
- 9: (2 connections)
- 10: (2 connections)
- 11: (2 connections)
- 12: (2 connections)
- 13: (2 connections)
- 14: (2 connections)
- 15: (2 connections)
- 16: (1 connection)
- 17: (1 connection)
Since and each have only valid connection, they must be the two end numbers of the row.
Step 3 · Construct the Arrangement
Starting from :
- From
- From
- From
- From
- From
- From
- From
- From
- From
- From
- At , possible choices are and :
- Choosing terminates prematurely after numbers (dead end).
- Choosing traps at since both its neighbours ( and ) are already visited (dead end).
- Therefore, we must choose .
- From
- From
- From
- From
- From
- From

The complete valid arrangement is:
Step 4 · Determine Uniqueness
Since and are the only numbers with a single valid neighbour, any valid line must start at one and end at the other.
At every step of the sequence, there is only one unvisited neighbour except at , where the only other branch () leads to dead ends.
Thus, there is only one unique way to arrange the numbers (the reverse order represents the same sequence).
There is only one unique arrangement:
(or its reverse)
- Overlooking Endpoints: Missing that numbers with only one connection ( and ) must be at the extremes of the row.
- Branching Errors: Taking instead of , which runs into a dead end before all numbers are used.
- Counting Reversals as Distinct: Counting the reversed sequence as a second arrangement when it is topologically identical.
More questions in A
Context: Look at the following numbers: 3 6 10 15 1. They are arranged such that each pair of adjacent numbers adds up to a square: , , , .
Q. Try arranging the numbers 1 to 17 (without repetition) in a row in a similar way — the sum of every adjacent pair of numbers should be a square. Can you arrange them in more than one way? If not, can you explain why?
Context: Look at the following numbers: . They are arranged such that each pair of adjacent numbers adds up to a square: , , , .
Q. Can you do the same with numbers from to (again, without repetition), but this time arranging all the numbers in a circle?