The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.



(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A000315 Number of reduced Latin squares of order n; also number of labeled loops (quasigroups with an identity element) with a fixed identity element.
(Formerly M3690 N1508)
1, 1, 1, 4, 56, 9408, 16942080, 535281401856, 377597570964258816, 7580721483160132811489280, 5363937773277371298119673540771840 (list; graph; refs; listen; history; text; internal format)



A reduced Latin square of order n is an n X n matrix where each row and column is a permutation of 1..n and the first row and column are 1..n in increasing order. - Michael Somos, Mar 12 2011

The Stones-Wanless (2010) paper shows among other things that a(n) is 0 mod n if n is composite and 1 mod n if n is prime.


L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 183.

J. Denes, A. D. Keedwell, editors, Latin Squares: new developments in the theory and applications, Elsevier, 1991, pp. 1, 388.

R. A. Fisher and F. Yates, Statistical Tables for Biological, Agricultural and Medical Research. 6th ed., Hafner, NY, 1963, p. 22.

C. R. Rao, S. K. Mitra and A. Matthai, editors, Formulae and Tables for Statistical Work. Statistical Publishing Society, Calcutta, India, 1966, p. 193.

J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 210.

H. J. Ryser, Combinatorial Mathematics. Mathematical Association of America, Carus Mathematical Monograph 14, 1963, pp. 37, 53.

N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

M. B. Wells, Elements of Combinatorial Computing. Pergamon, Oxford, 1971, p. 240.


Table of n, a(n) for n=1..11.

S. E. Bammel and J. Rothstein, The number of 9x9 Latin squares, Discrete Math., 11 (1975), 93-95.

Jeranfer Bermúdez, Richard García, Reynaldo López and Lourdes Morales, Some Properties of Latin Squares, Laboratorio Emmy Noether, 2009.

B. Cherowitzo, Latin Squares, Comb. Structures Lecture Notes.

Gheorghe Coserea, Solutions for n=5.

Gheorghe Coserea, Solutions for n=6.

Gheorghe Coserea, MiniZinc model for generating solutions.

E. N. Gilbert, Latin squares which contain no repeated digrams, SIAM Rev. 7 1965 189--198. MR0179095 (31 #3346). Mentions this sequence. - N. J. A. Sloane, Mar 15 2014

B. D. McKay, A. Meynert and W. Myrvold, Small latin squares, quasigroups and loops, J. Combin. Designs, vol. 15, no. 2 (2007) pp. 98-119.

B. D. McKay and E. Rogoyski, Latin squares of order ten, Electron. J. Combinatorics, 2 (1995) #N3.

B. D. McKay and I. M. Wanless, On the number of Latin squares. Preprint 2004.

B. D. McKay and I. M. Wanless, On the number of Latin squares, Ann. Combinat. 9 (2005) 335-344.

Young-Sik Moon, Jong-Yoon Yoon, Jong-Seon No, Sang-Hyo Kim, Interference Alignment Schemes Using Latin Square for Kx3 MIMO X Channel, arXiv:1810.05400 [cs.IT], 2018.

Noah Rubin, Curtis Bright, Kevin K. H. Cheung, and Brett Stevens, Integer and Constraint Programming Revisited for Mutually Orthogonal Latin Squares, arXiv:2103.11018 [cs.DM], 2021. Mentions this sequence.

J. Shao and W. Wei, A formula for the number of Latin squares., Discrete Mathematics 110 (1992) 293-296.

N. J. A. Sloane, My favorite integer sequences, in Sequences and their Applications (Proceedings of SETA '98).

D. S. Stones, The many formulas for the number of Latin rectangles, Electron. J. Combin 17 (2010), A1.

D. S. Stones and I. M. Wanless, Divisors of the number of Latin rectangles, J. Combin. Theory Ser. A 117 (2010), 204-215.

E. I. Vatutin, V. S. Titov, O. S. Zaikin, S. E. Kochemazov, S. U. Valyaev, A. D. Zhuravlev, M. O. Manzuk, Using grid systems for enumerating combinatorial objects with example of diagonal Latin squares, Information technologies and mathematical modeling of systems (2016), pp. 154-157. (in Russian)

Vatutin E.I., Zaikin O.S., Zhuravlev A.D., Manzyuk M.O., Kochemazov S.E., Titov V.S., Using grid systems for enumerating combinatorial objects on example of diagonal Latin squares. CEUR Workshop proceedings. Selected Papers of the 7th International Conference Distributed Computing and Grid-technologies in Science and Education. 2017. Vol. 1787. pp. 486-490. urn:nbn:de:0074-1787-5.

Eric Weisstein's World of Mathematics, Latin Square.

M. B. Wells, Elements of Combinatorial Computing, Pergamon, Oxford, 1971. [Annotated scanned copy of pages 237-240]

Index entries for sequences related to Latin squares and rectangles

Index entries for sequences related to quasigroups


a(n) = A002860(n) / (n! * (n-1)!) = A000479(n) / (n-1)!.


Cf. A000479, A002860, A003090, A040082, A057771, A057997.

Sequence in context: A000573 A070019 A056075 * A080984 A071579 A060497

Adjacent sequences:  A000312 A000313 A000314 * A000316 A000317 A000318




N. J. A. Sloane


Added June 1995: the 10th term was probably first computed by Eric Rogoyski

a(11) (from the McKay-Wanless article) from Richard Bean, Feb 17 2004



Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 13 07:51 EDT 2021. Contains 342935 sequences. (Running on oeis4.)