This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A108661 #20 Dec 29 2018 07:07:08 %S A108661 6,3,3,72,226,358,309,391,547,813,3562,10741,36633,94547,120424, %T A108661 393670,676579,1088429,5531195,3294327,8335128,27820643,75288569, %U A108661 111875702,264015370,465407197,687532936,1109951444,3256360099 %N A108661 Square loops: the number of circular permutations (reversals not counted as different) of the numbers 0 to n such that the sum of any two consecutive numbers is a square. %e A108661 There is no solution for n=0,...,30, (note offset=31). For n=0,1 we have the trivial square circles {0} and {0,1}, which are not included in the sequence. %e A108661 There are only six possible square loops of the minimum length (n=31 case): %e A108661 {1,0,4,5,31,18,7,29,20,16,9,27,22,3,13,12,24,25,11,14,2,23,26,10,6,30,19,17,8,28,21,15}, %e A108661 {1,0,4,12,13,3,6,30,19,17,8,28,21,15,10,26,23,2,14,22,27,9,16,20,29,7,18,31,5,11,25,24}, %e A108661 {1,0,4,21,28,8,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}, %e A108661 {1,15,10,26,23,2,14,22,27,9,16,20,29,7,18,31,5,11,25,0,4,21,28,8,17,19,30,6,3,13,12,24}, %e A108661 {1,15,21,28,8,17,19,30,6,10,26,23,2,14,11,5,31,18,7,29,20,16,9,27,22,3,13,12,4,0,25,24}, %e A108661 {1,15,21,28,8,17,19,30,6,10,26,23,2,14,11,25,0,4,5,31,18,7,29,20,16,9,27,22,3,13,12,24}. %e A108661 In the n=32,33 (resp.) cases, there are three square loop solutions: %e A108661 {1,0,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,21,28,8}, %e A108661 {1,8,28,21,4,32,17,19,30,6,3,13,12,24,25,11,5,31,18,7,29,20,16,0,9,27,22,14,2,23,26,10,15}, %e A108661 {1,8,28,21,15,10,26,23,2,14,22,27,9,16,20,29,7,18,31,5,11,25,0,4,32,17,19,30,6,3,13,12,24}, %e A108661 and %e A108661 {1,0,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,21,28,8}, %e A108661 {1,8,28,21,4,32,17,19,30,6,3,13,12,24,25,11,5,20,29,7,18,31,33,16,0,9,27,22,14,2,23,26,10,15}, %e A108661 {1,8,28,21,15,10,26,23,2,14,22,27,9,16,33,31,18,7,29,20,5,11,25,0,4,32,17,19,30,6,3,13,12,24} %e A108661 (resp.). %Y A108661 Cf. A108658 = square chains. %Y A108661 Cf. A071984, A090460, A108658, A108659, A108660. %K A108661 hard,nice,nonn,more %O A108661 31,1 %A A108661 _Zak Seidov_, _T. D. Noe_ & _Max Alekseyev_ Jun 16 2005 %E A108661 a(42)-a(47) from _Donovan Johnson_, Sep 14 2010 %E A108661 a(48)-a(52) from _Fausto A. C. Cariboni_, Sep 21 2018 %E A108661 a(53)-a(59) from _Bert Dobbelaere_, Dec 29 2018