login
Square chains: the number of permutations (reversals not counted as different) of the numbers 1 to n such that the sum of any two consecutive numbers is a square.
7

%I #47 May 01 2024 03:06:21

%S 1,1,1,0,0,0,0,0,3,0,10,12,35,52,19,20,349,392,669,4041,17175,12960,

%T 14026,11889,29123,39550,219968,553694,2178103,5301127,12220138,

%U 38838893,68361609,140571720,280217025,204853870,738704986,2368147377,5511090791,9802605881,21164463050,47746712739,68092497615,123092214818

%N Square chains: the number of permutations (reversals not counted as different) of the numbers 1 to n such that the sum of any two consecutive numbers is a square.

%C For n > 31, this sequence counts each circular solution (in which the first and last numbers also sum to a square) n times. Sequence A090460 counts the circular solutions only once, giving the number of essentially different solutions.

%C The existence of cubic chains in answered affirmatively in Puzzle 311. - _T. D. Noe_, Jun 16 2005

%D Ruemmler, Ronald E., "Square Loops," Journal of Recreational Mathematics 14:2 (1981-82), page 141; Solution by Chris Crandell and Lance Gay, JRM 15:2 (1982-83), page 155.

%H Zhao Hui Du, <a href="/A071983/b071983.txt">Table of n, a(n) for n = 15..59</a>

%H Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_311.htm">Puzzle 311: Sum to a cube</a>, The Prime Puzzles and Problems Connection.

%F a(n) = A090460(n) + (n-1)*A071984(n). - _Martin Ehrenstein_, May 16 2023

%e There is only one possible square chain of minimum length, which is: (8, 1, 15, 10, 6, 3, 13, 12, 4, 5, 11, 14, 2, 7, 9) so a(15)=1.

%Y Cf. A071984.

%Y Cf. A090460, A090461.

%Y Cf. A078107 (n for which there is no solution).

%K nice,hard,nonn

%O 15,9

%A _William Rex Marshall_, Jun 16 2002

%E a(43)-a(45) from _Donovan Johnson_, Sep 14 2010

%E a(46)-a(47) from _Jud McCranie_, Aug 18 2018

%E a(48) from _Jud McCranie_, Sep 17 2018

%E a(49)-a(52) from _Bert Dobbelaere_, Dec 30 2018

%E a(53)-a(54) from _Martin Ehrenstein_, May 16 2023

%E a(55)-a(56) from _Zhao Hui Du_, Apr 25 2024

%E a(57)-a(58) from _Zhao Hui Du_, Apr 26 2024