[seqfan] Re: square loop

zak seidov zakseidov at yahoo.com
Sat Oct 12 22:55:15 CEST 2019


Just two remarks :

Between 15 and 26 should be 10 not 19
We may include 0 between 9 and 16
and get larger set 0..36

Zak 

    On Saturday, October 12, 2019, 11:01:13 PM GMT+3, hv at crypt.org <hv at crypt.org> wrote:  
 
 After a recent puzzle in New Scientist.

The integers 1 .. 32 can be arranged in a loop such that each consecutive
pair sums to a square:
  32 4 21 28 8 1 15 19 26 23 2 14 22 27 9 16
  20 29 7 18 31 5 11 25 24 12 13 3 6 30 19 17

My trial code to test for this finds n = 32 is the smallest for which this
is possible, and finds solutions for each of 32 to 44; however the code
is becoming unusably slow as n increases.

My suspicion is that it is possible precisely for n >= 32, can someone
prove this, or at least show an upper bound for an n for which the loop
is not possible?

If we require only a sequence rather than a loop, the first solution
occurs with n = 15:
  8 1 15 10 6 3 13 12 4 5 11 14 2 7 9 
.. and it appears there are solutions for n in { 15, 16, 17, 23 } and
all n >= 25 (tested up to n = 47).

I would guess that the two examples might be of interest in the OEIS, but
the sets of values of n for which loops or sequences are (or are not)
possible would not be suitable as OEIS sequences.

Hugo

--
Seqfan Mailing list - http://list.seqfan.eu/
  



More information about the SeqFan mailing list