Osamu Shimabukuro
2026.1.27Utilitas Mathematica
Abstract
<p>Let <span class="math inline">\(k\)</span> be an odd prime and choose <span class="math inline">\(s\in\mathbb{Z}_k^\times\)</span> with <span class="math inline">\(s^2\not\equiv \pm1\pmod{k}\)</span> (hence <span class="math inline">\(k\ge7\)</span>). We give a deterministic, purely algebraic construction of <em>compound pandiagonal</em> (Nasik) magic squares of order <span class="math inline">\(k^{2}\)</span> with consecutive entries <span class="math inline">\(\{0,1,\dots,k^{4}-1\}\)</span>. The input is the <span class="math inline">\(k\times k\)</span> <em>Modular Inverse Shift</em> (MIS) kernel <span class="math inline">\(M_s(i,j)=si+s^{-1}j\in\mathbb{Z}_k\)</span>, a classical <em>linear Latin square</em>. Our contribution is not a new Latin-square object, but a closed-form integration of: (i) orthogonality of <span class="math inline">\((M_s,M_s^{\mathsf T})\)</span>, (ii) toroidal diagonal-regularity, and (iii) a two-level base-<span class="math inline">\(k\)</span> digit superposition producing a <span class="math inline">\(k^2\times k^2\)</span> square with closed-form evaluation of entries. We encode four <span class="math inline">\(\mathbb{Z}_k\)</span>-digits coming from <span class="math inline">\((M_s,M_s^{\mathsf T})\)</span> at both the block level and the within-block level, obtaining an explicit formula <span class="math inline">\(P_s(I,J)\in\{0,\dots,k^{4}-1\}\)</span>. 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 <span class="math inline">\(k\times k\)</span> block-sum array is itself pandiagonal magic, establishing the compound property.</p>
Citation format
SHIMABUKURO, Osamu. A deterministic construction of compound pandiagonal magic squares of order k2 via modular inverse shifts. Utilitas Mathematica, 2026.