Latin square
Number of n × n Latin squares

There is no known easily computable formula for the number L of n × n Latin squares with symbols 1, 2,..., n. The most accurate upper and lower bounds known for large n are far apart. One classic result is that ∏ k = 1 n (k !) n / k ≥ L n ≥ (n !) 2 n n n 2. {\displaystyle \prod _{k=1}^{n}\left(k!\right)^{n/k}\geq L_{n}\geq {\frac {\left(n!\right)^{2n}}{n^{n^{2}}}}.}

A simple and explicit formula for the number of Latin squares was published in 1992, but it is still not easily computable due to the exponential increase in the number of terms. This formula for the number L of n × n Latin squares is L n = n ! ∑ A ∈ B n (− 1) σ 0 (A) (per A n), {\displaystyle L_{n}=n!\sum _{A\in B_{n}}^{}(-1)^{\sigma _{0}(A)}{\binom {\operatorname {per} A}{n}},} where B is the set of all n × n {0, 1}-matrices, σ (A) is the number of zero entries in matrix A, and per(A) is the permanent of matrix A.

The table below contains all known exact values. It can be seen that the numbers grow exceedingly quickly. For each n, the number of Latin squares altogether (sequence A002860 in the OEIS) is n ! (n − 1)! times the number of reduced Latin squares (sequence A000315 in the OEIS).

For each n, each isotopy class (sequence A040082 in the OEIS) contains up to (n !) Latin squares (the exact number varies), while each main class (sequence A003090 in the OEIS) contains either 1, 2, 3 or 6 isotopy classes.

The number of structurally distinct Latin squares (i.e. the squares cannot be made identical by means of rotation, reflection, and/or permutation of the symbols) for n = 1 up to 7 is 1, 1, 1, 12, 192, 145164, 1524901344 respectively (sequence A264603 in the OEIS).
punctuation:no_comma