%I #48 Mar 06 2020 09:28:46
%S 1,3,18,80,75,126,196,144,405
%N a(n) is the minimum absolute value of nonzero determinants of order n Latin squares.
%C We apply every symbol permutation on the representatives of isotopic classes to generate Latin squares of order n and calculate the determinants.
%C These results are based upon work supported by the National Science Foundation under the grants numbered DMS-1852378 and DMS-1560019.
%H Brendan McKay, <a href="https://users.cecs.anu.edu.au/~bdm/data/latin.html">Latin squares</a>
%H Hugo Pfoertner, <a href="http://www.randomwalk.de/sequences/a309258.zip">Occurrence counts of determinant values for n=1..8</a>, zipped (2019).
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/LatinSquare.html">Latin square</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Latin_square">Latin square</a>
%H <a href="/index/De#determinants">Index entries for sequences related to determinants</a>
%e For n=2, the only Latin squares of order 2 are [[1, 2], [2, 1]] and [[2, 1], [1, 2]]. Therefore, the minimum absolute value of the determinants of order 2 Latin squares is 3.
%o (Sage)
%o # Takes a string and turns it into a square matrix of order n
%o def make_matrix(string,n):
%o m = []
%o row = []
%o for i in range(0,n * n):
%o if string[i] == '\n':
%o continue
%o if string[i] == ' ':
%o continue
%o row.append(Integer(string[i]) + 1)
%o if len(row) == n:
%o m.append(row)
%o row = []
%o return matrix(m)
%o # Reads a file and returns a list of the matrices in the file
%o def fetch_matrices(file_name,n):
%o matrices = []
%o with open(file_name) as f:
%o L = f.readlines()
%o for i in L:
%o matrices.append(make_matrix(i,n))
%o return matrices
%o # Takes a matrix and permutates each symbol in the matrix
%o # with the given permutation
%o def permute_matrix(matrix, permutation,n):
%o copy = deepcopy(matrix)
%o for i in range(0, n):
%o for j in range(0 , n):
%o copy[i,j] = permutation[copy[i][j] - 1]
%o return copy
%o """
%o Creates a determinant list with the following triples,
%o [Isotopy Class Representative, Permutation, Determinant]
%o The Isotopy class representatives come from a file that
%o contains all Isotopy classes.
%o """
%o def create_determinant_list(file_name,n):
%o the_list = []
%o permu = (Permutations(n)).list()
%o matrices = fetch_matrices(file_name,n)
%o for i in range(0,len(matrices)):
%o for j in permu:
%o copy = permute_matrix(matrices[i],j,n)
%o the_list.append([i,j,copy.determinant()])
%o print(len(the_list))
%o return the_list
%o # _Froylan Maldonado_, Jun 28 2019
%Y Cf. A040082, A301371 (upper bound for maximum determinant of Latin squares of order n), A309258, A309984, A309985.
%K nonn,more,hard
%O 1,2
%A _Alvaro R. Belmonte_, _Eugene Fiorini_, _Peterson Lenard_, _Froylan Maldonado_, _Sabrina Traver_, _Wing Hong Tony Wong_, Jun 28 2019
%E a(8) from _Hugo Pfoertner_, Aug 24 2019
%E a(9) from _Hugo Pfoertner_, Aug 27 2019