%I #29 Jun 13 2021 03:46:03
%S 0,0,0,12,8,21,53,112
%N Maximum number of partial 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}. A partial loop is a loop of length < 2*n.
%H E. 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 E. I. Vatutin, <a href="https://vk.com/wall162891802_1321">About the minimum and maximum number of partial loops in a diagonal Latin squares of order 8</a> (in Russian).
%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 Eduard I. Vatutin, <a href="/A307171/a307171.txt">Proving list (best known examples)</a>.
%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 < 12.
%e The total number of loops for this square is 21, all of which are partial.
%Y Cf. A307167, A307170.
%K nonn,more,hard
%O 1,4
%A _Eduard I. Vatutin_, Mar 27 2019
%E a(8) added by _Eduard I. Vatutin_, Oct 06 2020