Square Loops


A square loop is a circular permutation of the numbers 1 to n such that the sum of any two consecutive numbers is a square. It is known that the minimum n such that a squareloop exists is 32. There is a conjecture which says that there is a square loop for any n>=32. This is a random generator which works quite well for n<100.

n=, maximum number of trials= , with extension: