# Another loop of integers with consecutive terms adding to a square

The integers 1 to 50 are placed around a circle in such a way that the sum of any two of them which are adjacent is a perfect square. Of these integers, all but the prime integers were removed. Restore the missing integers..

## 1 Answer

Here's what I believe to be the (unique) solution:

• From Where did you get the circle Nov 29, 2017 at 2:39
• Isn't it obvious? The circle is the one used by the OP. Nov 29, 2017 at 3:18
• Any good approach for the answer? Nov 29, 2017 at 16:19
• There's nothing very fancy. To fill in a single-space gap you can look for things that produce squares when added to both (known) neighbours, and in the cases here there was only one possibility. For a two-space gap you look for possible neighbours of the two known cells on either side, and then see which pairs add up to make a square. For longer gaps you need (or at least I needed) to draw a graph (in the vertices-and-edges sense) showing what can be next to what, and then look for paths through it. Nov 29, 2017 at 16:21