%I #34 Jun 11 2021 13:50:15
%S 1,0,0,12,14,27,53,112
%N Maximum number of loops in a diagonal Latin square of order n.
%C A loop in a Latin square is a sequence of cells v1=L[i1,j1] -> v2=L[i1,j2] -> v1=L[i2,j2] -> ... -> v2=L[im,j1] -> v1=L[i1,j1] of length 2*m that consists of a pair of values {v1, v2}.
%C For diagonal Latin squares of order 4 all loops are intercalates. - _Eduard I. Vatutin_, Oct 05 2020
%H Eduard I. Vatutin, <a href="http://forum.boinc.ru/default.aspx?g=posts&m=92687#post92687">Discussion about properties of diagonal Latin squares at forum.boinc.ru</a> (in Russian).
%H Eduard I. Vatutin, <a href="https://vk.com/wall162891802_1320">About the minimum and maximum number of loops in a diagonal Latin squares of order 8</a> (in Russian).
%H Eduard I. Vatutin, <a href="/A307167/a307167.txt">Proving list (best known examples)</a>.
%H Eduard Vatutin, Alexey Belyshev, Natalia Nikitina, and Maxim Manzuk, <a href="https://doi.org/10.1007/978-3-030-66895-2_9">Evaluation of Efficiency of Using Simple Transformations When Searching for Orthogonal Diagonal Latin Squares of Order 10</a>, High-Performance Computing Systems and Technologies in Sci. Res., Automation of Control and Production (HPCST 2020), Communications in Comp. and Inf. Sci. book series (CCIS, Vol. 1304) Springer (2020), 127-146.
%H <a href="/index/La#Latin">Index entries for sequences related to Latin squares and rectangles</a>.
%e For example, the square
%e 2 4 3 5 0 1
%e 1 0 4 3 2 5
%e 0 2 5 4 1 3
%e 5 3 0 1 4 2
%e 4 5 1 2 3 0
%e 3 1 2 0 5 4
%e has a loop
%e 2 4 . . . .
%e . . . . . .
%e . 2 . 4 . .
%e . . . . . .
%e 4 . . 2 . .
%e . . . . . .
%e consisting of the sequence of cells L[1,1]=2 -> L[1,2]=4 -> L[3,2]=2 -> L[3,4]=4 -> L[5,4]=2 -> L[5,1]=4 -> L[1,1]=2 with length 6.
%e The total number of loops for this square is 21.
%Y Cf. A274806, A307166, A307163, A307164.
%K nonn,more,hard
%O 1,4
%A _Eduard I. Vatutin_, Mar 27 2019
%E a(8) added by _Eduard I. Vatutin_, Oct 05 2020