Awfāq Magic Square & Exact Bayt al-Kasr Solver
علم الأوفاق وبيت الكسر
Constructs orthogonal 3×3, 4×4, and 5×5 magic squares for any target constant using exact Euclidean division and Bayt al-Kasr remainder placement.
Primary Manuscript Authorities: al-Ghazālī (d. 1111 CE) — Classical 3×3 Muthallath Combinatorics · Muḥammad ibn Muḥammad al-Kishnāwī (d. 1741 CE) — Bahjat al-Āfāq fī ʿIlm al-Awfāq
Δ = 66 − 15 = 51 | Euclidean Quotient q = 17 | Remainder r = 0 | Exact Divisibility (r = 0 · Uniform Row/Column/Diagonal Sum)
#4 21 | #9 26 | #2 19 | ∑ 66 |
#3 20 | #5 22 | #7 24 | ∑ 66 |
#8 25 | #1 18 | #6 23 | ∑ 66 |
| ∑ 66 | ∑ 66 | ∑ 66 | ↘ 66 · ↙ 66 |