This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A338620 #63 Aug 17 2025 01:28:20 %S A338620 1,0,2,4,0,8,12386,0 %N A338620 Number of pandiagonal Latin squares of order 2n+1 with the first row in ascending order. %C A338620 A pandiagonal Latin square is a Latin square in which the diagonal, antidiagonal and all broken diagonals and antidiagonals are transversals. %C A338620 For orders n = 5, 7 and 11 all pandiagonal Latin squares are cyclic, so a(n) = A123565(2n+1) for n < 6. For n=6 (order 13), this is not true and there are 12386 inequivalent squares; of these 10 are cyclic (in all directions) and 1560 are semi-cyclic (A343867). %C A338620 Pandiagonal Latin squares exist only for odd orders not divisible by 3. This is because the positions of each symbol are a solution to the toroidal n-queens problem which only has solutions for these sizes. - _Andrew Howroyd_, May 26 2021 %H A338620 A. O. L. Atkin, L. Hay, and R. G. Larson, <a href="https://doi.org/10.1016/0898-1221(83)90130-X">Enumeration and construction of pandiagonal Latin squares of prime order</a>, Computers & Mathematics with Applications, Volume. 9, Iss. 2, 1983, pp. 267-292. %H A338620 Vahid Dabbaghian and Tiankuang Wu, <a href="http://dx.doi.org/10.1016/j.jda.2014.12.001">Constructing non-cyclic pandiagonal Latin squares of prime orders</a>, Journal of Discrete Algorithms 30, 2015. %H A338620 Vahid Dabbaghian and Tiankuang Wu, <a href="http://dx.doi.org/10.1002/jcd.21414">Constructing Pandiagonal Latin Squares from Linear Cellular Automaton on Elementary Abelian Groups</a>, Journal of Combinatorial Designs 23(5). %F A338620 a(n) >= A123565(2n+1) + A343867(n). - _Andrew Howroyd_, May 26 2021 %F A338620 a(n) = A342306(n) / (2n+1)!. - _Eduard I. Vatutin_, Jun 13 2021 %e A338620 Example of a cyclic pandiagonal Latin square of order 5: %e A338620 0 1 2 3 4 %e A338620 2 3 4 0 1 %e A338620 4 0 1 2 3 %e A338620 1 2 3 4 0 %e A338620 3 4 0 1 2 %e A338620 Example of a cyclic pandiagonal Latin square of order 7: %e A338620 0 1 2 3 4 5 6 %e A338620 2 3 4 5 6 0 1 %e A338620 4 5 6 0 1 2 3 %e A338620 6 0 1 2 3 4 5 %e A338620 1 2 3 4 5 6 0 %e A338620 3 4 5 6 0 1 2 %e A338620 5 6 0 1 2 3 4 %e A338620 Example of a cyclic pandiagonal Latin square of order 11: %e A338620 0 1 2 3 4 5 6 7 8 9 10 %e A338620 2 3 4 5 6 7 8 9 10 0 1 %e A338620 4 5 6 7 8 9 10 0 1 2 3 %e A338620 6 7 8 9 10 0 1 2 3 4 5 %e A338620 8 9 10 0 1 2 3 4 5 6 7 %e A338620 10 0 1 2 3 4 5 6 7 8 9 %e A338620 1 2 3 4 5 6 7 8 9 10 0 %e A338620 3 4 5 6 7 8 9 10 0 1 2 %e A338620 5 6 7 8 9 10 0 1 2 3 4 %e A338620 7 8 9 10 0 1 2 3 4 5 6 %e A338620 9 10 0 1 2 3 4 5 6 7 8 %e A338620 For order 13 there is a square %e A338620 7 1 0 3 6 5 12 2 8 9 10 11 4 %e A338620 2 3 4 10 0 7 6 9 12 11 5 8 1 %e A338620 4 11 1 7 8 9 10 3 6 0 12 2 5 %e A338620 6 5 8 11 10 4 7 0 1 2 3 9 12 %e A338620 8 9 2 5 12 11 1 4 3 10 0 6 7 %e A338620 3 6 12 0 1 2 8 11 5 4 7 10 9 %e A338620 10 0 3 2 9 12 5 6 7 8 1 4 11 %e A338620 1 7 10 4 3 6 9 8 2 5 11 12 0 %e A338620 11 4 5 6 7 0 3 10 9 12 2 1 8 %e A338620 5 8 7 1 4 10 11 12 0 6 9 3 2 %e A338620 12 2 9 8 11 1 0 7 10 3 4 5 6 %e A338620 9 10 11 12 5 8 2 1 4 7 6 0 3 %e A338620 0 12 6 9 2 3 4 5 11 1 8 7 10 %e A338620 that is pandiagonal but not cyclic (Dabbaghian and Wu). %Y A338620 Cf. A071607 (rows are cyclic), A123565, A342306, A343867 (semicyclic). %K A338620 nonn,more,hard %O A338620 0,3 %A A338620 _Eduard I. Vatutin_, Nov 04 2020 %E A338620 Zero terms for even orders removed by _Andrew Howroyd_, May 26 2021