**Self-orthogonal Diagonal Latin Square, (SODLS)**: A
diagonal Latin square
that is orthogonal to its transpose,
(Rotate 7).

MagicSquaresSODLS makes SODLS, (with symbols 0 to n-1). A magic square M is made from each SODLS Q and its transpose as, (see notes):

M[row][col] = n x Q[row][col] + Q[col][row] + 1

Note: associative, pandiagonal, ultramagic below refer to SODLS that make these types of magic square.

There are no pandiagonal Latin squares, (Knut Vik designs), for even orders or odd orders that are a multiple of 3. For these orders, the SODLS that make pandiagonal and ultramagic squares are only weakly pandiagonal, (SOWPLS), meaning that the sum of the n numbers in each of the 2n diagonals is the same.

See: associative SSSODLS, pandiagonal Knut Vik, weakly pandiagonal SOWPLS, ultramagic PSSSODLS.

SODLS makes SODLS for small orders, SODLS9 makes order 9 SODLS, SODLS10 makes order 10 SODLS.

Note: Pandiagonal and ultramagic here refer to Knut Vik designs.

Pandiagonal, ultramagic, and associative are easily made:

The pandiagonal method is borrowed from Inder Taneja. The ultramagic method is based on the formula Q[r][c] = (2r-c)%n for prime orders ≥ 5 by Xu and Lu. Other associative are made by swapping rows/columns of the ultramagic.

Small associative squares are also made by a backtracking procedure. Orders 11 and 13 associative made by backtracking are included in the program.

Non-prime order squares such as 25, 35, 49, 55 are sometimes made as composites of smaller ones.

Note: Pandiagonal and ultramagic here refer to weakly pandiagonal.

For order 9, an associative is made by backtracking, a pandiagonal is made based on one by Inder Taneja,
and an ultramagic made by backtracking is included in the program.

An order 15 associative made by backtracking is included in the program.

An order 27 pandiagonal is made based on one by Xu and Lu.

Other methods, (extending concepts from squares by Mitsutoshi Nakamura):

- x 5s+4 such as 39 (7 5s+4), 69 (13 5s+4), 129 (25 5s+4), 159 (31 5s+4)
- x ks+1 such as 21 (5 4s+1), 33 (4 8s+1), 183 (13 14s+1), 633 (8 79s+1)
- x ks+k/2 such as 27 (5 5s+2), 93 (5 17s+8), 123 (9 13s+6), 753 (5 137s+68)
- x ks+c for c=4, 8, 10 such as: 303 (13 23s+4), 543 (7 77s+4) (13 41s+10), 843 (17 49s+10), 1983 (25 79s+8), 6663 (11 605s+8)

x ks+1 are similar to an order 21 by Mitsutoshi Nakamura.

Some squares, such as 45, 63, 75, 81 are made as composites of smaller ones.

Note: Pandiagonal and ultramagic here refer to weakly pandiagonal.

Small order associative squares are made by a backtracking procedure.

An order 12 associative made by backtracking is included in the program. Order 24 is made as 4 5s+4 similar to a 24 magic by Mitsutoshi Nakamura. An order 8 ultramagic and an order 16 associative made by backtracking are included for variety.

Associative squares are sometimes converted to pandiagonal squares by Planck's A-D method. See note.

Some squares, such as 16, 20, 28, 32 are made as composites of smaller ones.

Note: There are no associative or pandiagonal Latin squares of singly-even order. See proofs.

An order 10 magic, made by backtracking, is included in the program. Two order 14 magic, with center 4x4, are included. One is adapted from an order 14 by Inder Taneja based on Bennett, Du and Zhang; the other order 14 was made by backtracking.

Orders 18, 22, 26 and 30 are made with a diagonal, center 4x4 similar to an order 18 by Mitsutoshi Nakamura.

Other methods, (extending concepts from Mitsutoshi Nakamura's squares):

- x 5s+4 such as 54 (10 5s+4), 94 (18 5s+4), 174 (34 5s+4), 214 (42 5s+4)
- x 8s+2 such as 34 (4 8s+2), 42 (5 8s+2), 58 (7 8s+2), 66 (8 8s+2)
- x ks+1 such as 46 (5 9s+1), 78 (7 11s+1), 86 (5 17s+1), 118 (9 13s+1)
- x ks+k/2 such as 22 (4 5s+2), 38 (5 7s+3), 446 (23 19s+9), 838 (19 43s+21)
- x ks+c for c=4, 8, 10, such as: 158 (7 22s+4) (37 4s+10), 278 (67 4s+10), 718 (7 102s+4) (71 10s+8) (59 12s+10), 758 (13 58s+4) (25 30s+8) (17 44s+10)

x ks+k/2 are similar to an order 22 by Mitsutoshi Nakamura.

Some squares, such as 50, 70, 90, 98 are made as composites of smaller ones.

Here are fragments of consoles for **1 1000** and some of the thousands of variations for **1000**.

Note that **none 3** is because there is no SODLS of order 2, 3, or 6.

The number of SODLS for some small orders is known. See notes.

* nfr: SODLS with natural order first row, (0 1 2 3 ... ).

Francis Gaspalou calculated the number of SODLS for
order 8 in 2010.

Eduard Vatutin has confirmed the numbers for
orders up to 8 and added OEIS sequences,
(A287761,
A287762).

Here is type information for the magic squares:

A SODLS remains a SODLS under Transform 1 and Transform 2.

Amela, Miguel Angel
miguel.amel@gmail.com

General Pico - La Pampa - Argentina

"Universal H-IXOHOXI Magic Squares of Order Eight"

http://www.multimagie.com/AmelaUHIMS.pdf

"A Sextuply Self-Orthogonal Latin Square of Order Nine and their Magic Squares", 2014

6-SOLS 9x9.pdf

Bennett, Frank E., Beiliang Du and Hantao Zhang

"Existence of self-orthogonal diagonal Latin squares
with a missing subsquare", 2003

http://www.sciencedirect.com/science/article/pii/S0012365X02004612

Cao, H. and W. Li

"Existence of strong symmetric self-orthogonal diagonal Latin squares", 2011

http://www.sciencedirect.com/science/article/pii/S0012365X11000513

Gaspalou, Francis
francis.gaspalou@wanadoo.fr

Website http://www.gaspalou.fr/magic-squares/

Francis communicated the number of order 8 SODLS to an e-mail group in July, 2010.
He computed the number of SODLS with the natural order first row as 1,152, and calculated
the total as 1,152 x 8! = 46,448,640.

Hedayat, A and W.T.Federer

"On The Nonexistence of Knut Vik Designs For All Even Orders", 1975

https://www.jstor.org/stable/2958957?seq=1#page_scan_tab_contents

Hedayat, A

"A complete solution to the existence and nonexistence of Knut Vik designs and orthogonal Knut Vik designs", 1977

http://www.sciencedirect.com/science/article/pii/0097316577900073

Henderson, Matthew

"On Pandiagonal Strongly Symmetric Self-Orthogonal
Diagonal Latin Squares (PSSSODLS)", 2012

http://mhenderson.net/assets/research/articles/12_04_16_psssodls.pdf

Kim, Kichul and V. K. Prasanna Kumar

"Perfect Latin Squares and Parallel Array Access", 1989

http://mprc.pku.edu.cn/~liuxianhua/chn/corpus/Notes/articles/isca/1989/p372-kim/p372-kim.pdf

Kochemazov, Stepan, Eduard Vatutin, and Oleg Zaikin

"Fast Algorithm for Enumerating Diagonal Latin Squares of Small Order", 2017

https://arxiv.org/abs/1709.02599

Lu, Runming, Sheng Liu and Jian Zhang

"Searching for Doubly Self-orthogonal Latin Squares", 2011

http://link.springer.com/chapter/10.1007%2F978-3-642-23786-7_41#page-1

Nakamura, Mitsutoshi
nkmagiccubes@gmail.com

Website http://magcube.la.coocan.jp/magcube/en/

The SODLS squares referred to above were communicated to Inder Taneja and an e-mail group by
Mitsutoshi in July, 2015.

Taneja, Inder J.
ijtaneja@gmail.com

Formerly, Professor of Mathematics, Federal University of Santa Catarina,

88040-400 Florianópolis, SC, Brazil.

"Intervally Distributed, Palindromic, Selfie Magic Squares, and Double Colored Patterns", 2015

http://rgmia.org/papers/v18/v18a127.pdf

"Intervally Distributed, Palindromic and Selfie Magic Squares: Genetic Table and Colored
Pattern - Orders 11 to 20", 2015

http://rgmia.org/papers/v18/v18a140.pdf

"Intervally Distributed, Palindromic and Selfie Magic Squares - Orders 21 to 25", 2015

http://rgmia.org/papers/v18/v18a151.pdf

Vatutin, Eduard I.
evatutin@rambler.ru

Website http://evatutin.narod.ru/indexeng.html

Xu, Cheng-Xu and Zhun-Wei Lu

"Pandiagonal Magic Squares", 2005

http://link.springer.com/chapter/10.1007%2FBFb0030856#page-2

Zhang, Yong, Wen Li and Jian Guo Lei

"Existence of weakly pandiagonal orthogonal Latin squares", 2013

http://link.springer.com/article/10.1007%2Fs10114-013-2274-1