A deterministic construction of compound pandiagonal magic squares of order k2 via modular inverse shifts
Abstract
Let \(k\) be an odd prime and choose \(s\in\mathbb{Z}_k^\times\) with \(s^2\not\equiv \pm1\pmod{k}\) (hence \(k\ge7\)). We give a deterministic, purely algebraic construction of compound pandiagonal (Nasik) magic squares of order \(k^{2}\) with consecutive entries \(\{0,1,\dots,k^{4}-1\}\). The input is the \(k\times k\) Modular Inverse Shift (MIS) kernel \(M_s(i,j)=si+s^{-1}j\in\mathbb{Z}_k\), a classical linear Latin square. Our contribution is not a new Latin-square object, but a closed-form integration of: (i) orthogonality of \((M_s,M_s^{\mathsf T})\), (ii) toroidal diagonal-regularity, and (iii) a two-level base-\(k\) digit superposition producing a \(k^2\times k^2\) square with closed-form evaluation of entries. We encode four \(\mathbb{Z}_k\)-digits coming from \((M_s,M_s^{\mathsf T})\) at both the block level and the within-block level, obtaining an explicit formula \(P_s(I,J)\in\{0,\dots,k^{4}-1\}\). Orthogonality yields bijectivity, while a carry-sensitive diagonal decomposition proves that every broken diagonal of both slopes sums to the magic constant. Finally, evaluating block sums shows that the induced \(k\times k\) block-sum array is itself pandiagonal magic, establishing the compound property.
Fields of Study & Subjects
Advanced Combinatorial Mathematics
Mathematics and Applications
Analytic Number Theory Research
Publication details
- Journal / source
- Utilitas Mathematica
- Volume
- 126
- Pages
- 125–157
- Publication date
- 27 January 2026
- Language
- EN