Generation of all magic squares of order 5 and interesting patterns finding

Ziqi Lin 1 , Sijie Liu 1 , Kai-Tai Fang 1 ,  and Yuhui Deng 1
  • 1 Division of Science and Technology, BNU-HKBU United International College, Zhuhai, China


This paper presents an enumeration algorithm to generate all magic squares of order 5 based on the ideas of basic form (Schroeppel [7]) and generating vector which is extension of Frénicle Quads (Ollerenshaw and Bondi [6]). The results lead us to extend Frénicle-Amela patterns from the case of order 4 to the case of order 5, which we refer to Frénicle-Amela-Like patterns. We show that these interesting Frénicle-Amela-Like patterns appear simultaneously. The number of these patterns is also calculated.

If the inline PDF is not rendering correctly, you can download the PDF file here.

  • [1] Candy, A. L., 1937: Construction, Classification and Census of Magic Squares of Order 5. Edwards brothers, 249 pp.

  • [2] Chinese Magic Square, 2014: Accessed 12 June 2014.

  • [Available online at]

  • [3] Clifford, A. P., 2003: The Zen of Magic Squares, Circles, and Stars. Princeton University Press, 373 pp.

  • [4] Fang, K. T., Luo, Y. Y., and Zheng, Y. X., 2015: Classification of magic squares of order 4. Proc. IWMS. Haikou, China, International Workshop on Matrices and Statistics, 84-97.

  • [5] Garder, M., 1975: Mathematical games, A breakthrough in magic squares, and the first perfect magic cube. Scientific American, 118-123.

  • [6] Ollerenshaw, K., and Bondi, H., 1982:Magic squares of order four. Philosophical Transactions of the Royal Society of London. Series A, Mathematical and Physical Sciences, 306, 443-532.

  • [7] Schroeppel, R., 1976: The Order 5 Magic Squares Program, Scientific American.

  • [8] Styan, G. P. H., 2014: Some illustrated comments on 5 x 5 goldenmagicmatrices and on 5 x 5 Stifelsche Quadrate. 23rd Conf. International Workshop on Matrices and Statistics, Ljubljana, Slovenia, 41 pp.

  • [9] Trump, W., 2012: How many magic squares are there? Accessed 12 June 2014. [Available online at magic-squares/howmany.html.]

  • [10] Baidu Tieba, 2010: Accessed 11 June 2014. [Available online at cid=0&from=prin\sharp10675158083?from=prin.]


Journal + Issues

Special Matrices is a peer-reviewed, open access electronic journal that publishes original articles of wide significance and originality in all areas of research involving structured matrices present in various branches of pure and applied mathematics and their noteworthy applications in physics, engineering, and other sciences.