A Generalization of Yang Hui's Magic Squares

The generalized construction methods for magic squares, inspired by the ancient Chinese mathematician Yang Hui's classical work "Xu Gu Zhai Qi Suan Fa". These methods can construct 4n-order magic squares and 2(2n+1)-order magic squares.


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("YangHuiMagic")

1.1 by Chun-Xiao Nie, 7 months ago


Browse source code at https://github.com/cran/YangHuiMagic


Authors: Chun-Xiao Nie [aut, cre] (ORCID:


Documentation:   PDF Manual  


GPL-3 license



See at CRAN