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
Δ = 249 − 15 = 234 | Euclidean Quotient q = 78 | Remainder r = 0 | Exact Divisibility (r = 0 · Uniform Row/Column/Diagonal Sum)
#4 82 | #9 87 | #2 80 | ∑ 249 |
#3 81 | #5 83 | #7 85 | ∑ 249 |
#8 86 | #1 79 | #6 84 | ∑ 249 |
| ∑ 249 | ∑ 249 | ∑ 249 | ↘ 249 · ↙ 249 |