
I came across this internet meme and one of my friend mentioned that he thinks that such number circle would always exists for any big enough integer. We tried to prove the hypothesis, but could not find a proof.
We defined the circle to be a Hamiltonian cycle of a graph $G_n$ where $V(G_n) = \{1, ..., n\}$ and $$E(G_n) = \{(v_1, v_2)\mid v_1, v_2 \in V,~i \in \Bbb Z \text{ where } v_1 + v_2 = i^2 \}$$
My attempt was to show that there exists a hamiltonian path in $G_n$ that starts and ends for vertex of neighbors of $n+1$, but without success.
PS: I built a simple program that brute forcely computes for a hamiltonian cycle of such graph and got this for result
31 : false
32 : 1-8-28-21-4-32-17-19-30-6-3-13-12-24-25-11-5-31-18-7-29-20-16-9-27-22-14-2-23-26-10-15
33 : 1-8-28-21-4-32-17-19-30-6-3-13-12-24-25-11-5-20-29-7-18-31-33-16-9-27-22-14-2-23-26-10-15
34 : 1-3-13-12-4-32-17-8-28-21-15-34-30-19-6-10-26-23-2-14-22-27-9-16-33-31-18-7-29-20-5-11-25-24
35 : 1-3-6-19-30-34-2-7-18-31-33-16-9-27-22-14-11-25-24-12-13-23-26-10-15-21-28-8-17-32-4-5-20-29-35
36 : 1-3-6-19-30-34-2-23-26-10-15-21-4-32-17-8-28-36-13-12-24-25-11-5-20-29-7-18-31-33-16-9-27-22-14-35
37 : 1-3-22-14-35-29-20-5-11-25-24-12-37-27-9-16-33-31-18-7-2-34-15-21-4-32-17-19-30-6-10-26-23-13-36-28-8
...
58 : 1-3-6-10-15-21-4-5-11-25-39-42-58-23-13-36-28-53-47-2-34-30-51-49-32-17-19-45-55-26-38-43-57-24-40-41-8-56-44-37-12-52-48-33-31-50-14-22-27-54-46-18-7-9-16-20-29-35
I don't know if this is any clue, but nearly every path segments between each $n$ are reused either partially or in reversed order.
PS2: If anyone is interested in generating their own series, to reduce the burden, here is a javascript source code of generating brute force Hamiltonian cycle of the graph.
var size = 32;
var maxSqrt = () => Math.sqrt(size * 2 - 1) | 0;
function isSquare(x) {
return x > 0 && Math.sqrt(x) % 1 === 0;
}
function foo(n = 1, step = 0, visited = new Array(size).fill(false)) {
if (step == size - 1) {
if (isSquare(n + 1)) {
return n;
} else {
return false;
}
}
visited[n - 1] = true;
//find edges
var minSqrt = Math.ceil(Math.sqrt(n));
minSqrt = minSqrt === 1 ? 2 : minSqrt;
//recursivly run edges
for (var i = minSqrt; i <= maxSqrt(); i++) {
var target = i * i - n;
if (n != target && !visited[target - 1] && target <= size && target > 0) {
var temp = foo(target, step + 1, visited.slice(0));
if (!temp) continue;
else {
return n + "-" + temp;
}
}
}
return false;
}
console.log(size + " : " + foo());
PS3: The question about Hamiltonian path of n numbers seems relevant to this question
FindHamiltonianCycle[RelationGraph[(Sqrt[#1 + #2] == Floor[Sqrt[#1 + #2]]) && (#1 != #2) &, Range[k]]]generates a cycle for the numbers $1$ to $k$. (I suspect Gerbicz' dedicated algorithm is more efficient.) – Blue Dec 01 '21 at 07:22T(c)=25*a[1]+c,25*a[2]-c,25*a[3]+c,25*a[4]-c,...,25*a[n]+(-1)^(n+1)*cthis formula and it's property to compute for segments of sequences for the hamiltonian cycle. But how can you be sure that there exists glue between each sequences? – IChung Dec 01 '21 at 09:13