Mathematical workbench

Square laboratory

Control an arbitrary square through E, x, and y, or obtain these coordinates from a parametric family.

Red–yellow

ABEFJ

E169x120y−33
Matrix 3 × 3 · valuesΣ = 507
A289
B16
C202
D82
E169
F256
G136
H322
J49

a brick-red frame marks a value that is a perfect square

Magic invariantall 8 line sums agree
Declared maskABEFJ · confirmed
Actual result5/9 squares
Nondegeneracy9 pairwise-distinct entries

Family ABEFJ

Theorem and complete proof

General theory of the 4/9 and 5/9 orbits

Statement

Under the assumptions below, the formulas define an integral magic square of order 3 in which at least all 5 cells of the ABEFJ mask are squares of integers. Other cells are allowed to be squares as well.

{A,B,E,F,J}{P:MP(E,x,y)=rP2}\{A,B,E,F,J\}\subseteq\{P:\mathcal M_P(E,x,y)=r_P^2\}

The parameters a, b, c, and d are integers. After the definitions below, the exact condition g₁g₂ ≠ 0 is required; then p and q are defined integers. This formula makes no claim about the zero branches of that division.

Initial system and elimination of E, x, y

For every marked cell, introduce an integral root and substitute the corresponding Magic3 linear form. This gives the system:

{E+x=qA2,Ex+y=qB2,E=qE2,E+x+y=qF2,Ex=qJ2.\left\{\begin{aligned}E+x&=q_A^2,\\E-x+y&=q_B^2,\\E&=q_E^2,\\E+x+y&=q_F^2,\\E-x&=q_J^2.\end{aligned}\right.

The coefficient matrix of E, x, and y has rank 3. Eliminating them therefore leaves 2 independent homogeneous quadratic equations in the roots. The equations are derived and parametrized below.

Derivation of the root parametrization

Introduce the following auxiliary integers:

α=b,β=a,ρ=α2+2αβ+β2,σ=α2+β2,τ=α2+2αββ2\alpha=b,\quad\beta=a,\quad \rho=-\alpha^2+2\alpha\beta+\beta^2,\quad \sigma=\alpha^2+\beta^2,\quad \tau=\alpha^2+2\alpha\beta-\beta^2g1=gcd(2αβ,c),g2=gcd(α2β2,d),p=2αβg1,q=α2β2g2g_1=\gcd(2\alpha\beta,c),\quad g_2=\gcd(\alpha^2-\beta^2,d),\quad p=\frac{2\alpha\beta}{g_1},\quad q=\frac{\alpha^2-\beta^2}{g_2}u=pg1+qg2=τ,v=pg2qg1,w=pg1qg2=ρ,z=pg2+qg1u=pg_1+qg_2=\tau,\quad v=pg_2-qg_1,\quad w=pg_1-qg_2=\rho,\quad z=pg_2+qg_1

Define the declared cell values as the following explicit squares:

(A,B,E,F,J)=(u2,v2,σ2,z2,w2)(A,B,E,F,J)=(u^2,v^2,\sigma^2,z^2,w^2)

The red identity gives u²+w²=2σ². The Gaussian identity (pg₁+qg₂)²+(pg₂−qg₁)²=(pg₁−qg₂)²+(pg₂+qg₁)² simultaneously gives u²+v²=w²+z². These are precisely the compatible red and yellow relations.

u2+w2=2σ2,u2+v2=w2+z2u^2+w^2=2\sigma^2,\qquad u^2+v^2=w^2+z^2A+J=2E,A+B=F+JA+J=2E,\qquad A+B=F+J

First parametrize the red quadric by ρ, σ, τ. After rearrangement, the yellow quadric is z²−v²=u²−w²=(u−w)(u+w). For the displayed red roots, the factors on the right are, up to powers of 2, products of 2αβ and α²−β². Distribute them among p, q, g₁, g₂ using gcds and set v=pg₂−qg₁, z=pg₂+qg₁. Then z²−v²=4pqg₁g₂ exactly matches u²−w². Thus the formulas are derived from the two quadrics rather than merely verified after the fact.

Reconstruction of the magic square

Use the standard three-coordinate form:

M(E,x,y)=(E+xEx+yEyExyEE+x+yE+yE+xyEx)\mathcal M(E,x,y)=\begin{pmatrix} E+x & E-x+y & E-y\\ E-x-y & E & E+x+y\\ E+y & E+x-y & E-x \end{pmatrix}

Set the coordinates equal to the following linear combination of the square values already constructed:

(E,x,y)=(E,AE,BJ)(E,x,y)=(E,\,A-E,\,B-J)

The general linear lemma is applied directly: when the selected cell-form matrix has rank 3, its value vector lies in the image exactly when every vector in the left kernel annihilates it. The left kernel has dimension one for four cells and two for five cells. The colored identities above form precisely such a basis, while the displayed formulas for E, x, and y give the unique preimage.

LS(E,x,y)T=(qP2)PS,kerLST=R1,,R2L_S(E,x,y)^T=(q_P^2)_{P\in S},\qquad \ker L_S^T=\langle R_1,\ldots,R_{2}\rangle

Now substitute the coordinates into the nine Magic3 linear forms. Therefore

πABEFJ ⁣(M(E,x,y))=(A,B,E,F,J){n2:nZ}5\pi_{ABEFJ}\!\left(\mathcal M(E,x,y)\right)=(A,B,E,F,J)\in\{n^2:n\in\mathbb Z\}^{5}

By the Magic3 form itself, every row, every column, and both diagonals sum to 3E. We have therefore obtained the required family of magic squares with square-valued mask ABEFJ. This proves the claim.

Color lemmas used in this proof

Light-red arithmetic progression

A+J=2EA+J=2E

A red triple means the linear condition U + W = 2V on three cells whose values are all perfect squares.

r=a2+2ab+b2,s=a2+b2,t=a2+2abb2r=-a^2+2ab+b^2,\qquad s=a^2+b^2,\qquad t=a^2+2ab-b^2r2+t2=2s2r^2+t^2=2s^2(U,V,W)=(k2r2,k2s2,k2t2)U+W=2V(U,V,W)=(k^2r^2,\,k^2s^2,\,k^2t^2)\Longrightarrow U+W=2V

In this mask, the lemma variables are replaced by cells A, E, J; its conclusion is exactly the cell relation displayed above.

General statement and proof

Yellow equality of two sums of squares

A+B=F+JA+B=F+J

A yellow four-cell support comes from composition of the Gaussian norm and gives an equality between two pairwise cell sums.

u=ac+bd,v=adbc,w=acbd,z=ad+bcu=ac+bd,\quad v=ad-bc,\quad w=ac-bd,\quad z=ad+bcu2+v2=w2+z2=(a2+b2)(c2+d2)u^2+v^2=w^2+z^2=(a^2+b^2)(c^2+d^2)(U,V,W,Z)=(u2,v2,w2,z2)U+V=W+Z(U,V,W,Z)=(u^2,v^2,w^2,z^2)\Longrightarrow U+V=W+Z

In this mask, the lemma variables are replaced by cells A, B, F, J; its conclusion is exactly the cell relation displayed above.

General statement and proof

Coverage completeness

Status: exact conditional coverage. Completeness here refers to rational root vectors; integral representatives are obtained by clearing denominators and applying a common scale.

Broadest guaranteed subset

Every rational solution of the two quadrics on the open branch A≠J. This is exactly the branch u²−w²≠0; after denominators are cleared, it is covered by the integral gcd formula.

AJ=u2w20A-J=u^2-w^2\ne0(uw)(u+w)=(zv)(z+v)0(u-w)(u+w)=(z-v)(z+v)\ne0

Inverse construction

First invert the red conic completely. Then distribute the nonzero factors u−w and u+w among p,q,g₁,g₂; a common scale clears rational denominators, and gcds give integral representatives. The formulas v=pg₂−qg₁ and z=pg₂+qg₁ recover the original point up to signs.

What remains outside the guarantee

The zero branches A=J remain outside the guarantee: there u=±w and simultaneously z=±v. The current formula divides by one of the zero factors; these components require separate charts and are not claimed to be covered.

Exc(ΦS){A=J}={u2=w2}\operatorname{Exc}(\Phi_S)\subseteq\{A=J\}=\{u^2=w^2\}

Completeness is proved exactly on the branch A≠J; global completeness is not claimed until the zero charts are added.

The text reconstructs a legacy parametrization; its machine certificate has not yet been migrated to proof-core.legacy_red_yellow_abefj