%I #61 May 29 2024 07:04:21
%S 15,16,17,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,
%T 44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,
%U 67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89
%N Numbers k for which there exists a permutation of the numbers 1 to k such that the sum of adjacent numbers is a square.
%C Conjecture: sequence includes all integers k > 24. See A090460 for the number of essentially different solutions.
%C It is now known that 25..299 are in the sequence, see the Numberphile 2 link. - _Jud McCranie_, Jan 11 2018
%C Every 25 <= k <= 2^20 is in the sequence and (71*25^m-1)/2 is also in the sequence for every m, hence this sequence is infinite, see Mersenneforum link for the proof; we give Hamiltonian cycle for these k values if k >= 32. - _Robert Gerbicz_, Jan 17 2017
%C The conjecture has been proved: every k >= 25 is in the sequence, moreover for k >= 32 there is a Hamiltonian cycle; see Mersenneforum topic for a code and deterministic algorithm to find a sequence. - _Robert Gerbicz_, Jan 21 2018
%H Brady Haran and Matt Parker, <a href="https://www.youtube.com/watch?v=G1m7goLCJDY">The Square-Sum Problem</a>, Numberphile video (2018)
%H Brady Haran, Matt Parker, and Charlie Turner, <a href="https://www.youtube.com/watch?v=7_ph5djCCnM">The Square-Sum Problem (extra footage) - Numberphile 2</a> (2018)
%H HexagonVideos, <a href="https://www.youtube.com/watch?v=-vxW42R47bc">Numberphile's Square-Sum Problem was solved!</a>, YouTube video, 2023.
%H Mersenneforum, <a href="http://mersenneforum.org/showthread.php?p=477787">The Square-Sum problem</a>
%e See A071983.
%p F:= proc(n)
%p uses GraphTheory;
%p local edg, G;
%p edg:= select(t -> issqr(t[1]+t[2]),{seq(seq({i,j},i=1..j-1),j=1..n)}) union {seq({i,n+1},i=1..n)};
%p G:= Graph(n+1,edg);
%p IsHamiltonian(G)
%p end proc:
%p select(F, [$1..50]); # _Robert Israel_, Jun 05 2015
%t Join[{15, 16, 17, 23}, Range[25, 100]] (* _Paolo Xausa_, May 28 2024 *)
%Y Cf. A071983, A071984 (number of circular solutions), A090460.
%Y Cf. A078107 (k for which there is no solution).
%K nonn
%O 1,1
%A _T. D. Noe_, Dec 01 2003
%E a(31)-a(69) from _Donovan Johnson_, Sep 14 2010