Integers and Number-theory The positive integers from $1$ to $n$ (where $n>1$) are arranged in a line such that
the sum of any two adjacent numbers is a square. What is the minimum value
of $n$?
 A: It is conjectured that there is not a maximum value of $n$. See this post. It is a question of mine regarding exactly this, and today, it still remains an open problem such that most people I know refer to it as the "Square-Sum Problem."
An Australian mathematician by the name of Matt Parker perhaps introduced this problem or popularised it in one of his books, Things to Make and Do in the Fourth Dimension $(2014)$. In the book, he conjectured that there always exists such a sequence for $n > 89$, and then $n > 91$.
However, in a Numberphile YouTube video, Matt Parker and his friend talks about how they tested this conjecture for more values, and as far as I know, the conjecture is true thus far and we now want to test for values $n > 300$.
The video has two parts, Part 1 and Part 2.

The minimum value of $n$ is definitely not $2$, as $1+2=3\neq k^2$ for an integer $k$. I believe the minimum value is $15$, but I have to go through the book again. In the meantime, I will attempt to write a program...
Edit: Notice that the $15$-length sequence (as pointed out by @LoveInvariants), $$8,1,15,10,6,3,13,12,4,5,11,14,2,7,9$$ has a particular method of being found. You start with all the number from $1$ to $15$. Then, you start your sequence with $1$. Now, looking at the remainding numbers, find the highest number out of those such that when you add $1$ to it, the result is a square number. The answer, is $15$. Now with your new remainding numbers, find the lowest number out of those such that when you add $15$ to it, the result is a square number. Next, find the highest, then the lowest, and continue. You should have one number left: $8$, and now, all is left is to put the $8$ at the beginning of the sequence before $1$. As far as I have tested in the last two months or so, this is the only sequence that can be generated using this specific method.
This might contribute to why $15$ might be the minimum value for $n$.

Update:
Ok the coding finished and I left the program running overnight. After fixing a couple of errors in the morning, it turns out $15$ is in fact the minimum value of $n$.
