Arithmetic of a minimal 9/9 square
Prime divisors in a minimal 9/9 square
Representations as sums of two squares determine the possible prime divisors of the central root and exclude primes of the form 8k+3 from every other root.
1. Assumptions and notation
Consider a 3×3 magic square whose nine entries are positive, pairwise distinct squares of integers:
The square is called minimal when all entry roots are coprime as a collection:
Equivalently, the entries cannot all be divided by the same integer square greater than one. All factorizations below concern entry roots; prime exponents in the entries themselves are twice as large.
2. Two sets of identities
Every pair of entries opposite through the center has sum 2e²:
Moreover, every corner is the middle term of an arithmetic progression whose endpoints are two side entries:
Proof
In the form m(e²,x,y), the offsets of the four opposite pairs from the center are x, y−x, y, and x+y. Adding each pair cancels its offset and gives 2e². For the first corner-centered progression,
The other three identities follow by the same expansion or by rotating the square.
3. Primes 4k+3 and a sum of two squares
Lemma
Let q be prime with q≡3 (mod 4). If q divides u²+v², then q divides both u and v.
Proof
If v were not divisible by q, then the class uv⁻¹ would be a square root of −1 modulo q. Euler's criterion gives
so no such root exists. Hence q divides v, and then q∣u² implies q∣u.
Valuation form
If u and v are not both zero, then
Indeed, after removing the common power of q, the remaining sum of two squares is not divisible by q by the lemma.
4. The unique primitive representation of one prime power
Why factorization is unique in ℤ[i]
For z=u+iv put N(z)=u²+v². Given α,β∈ℤ[i] with β≠0, round the real and imaginary parts of α/β to the nearest integers to obtain γ∈ℤ[i]. Then the remainder ρ=α−γβ satisfies
Thus the norm is Euclidean. The Euclidean algorithm gives greatest common divisors and Bézout identities. Hence every irreducible is prime: if π∣αβ and π∤α, then gcd(π,α)=1, and multiplying a Bézout identity by β gives π∣β. Factorization into irreducibles exists by descent on the positive norm, and primality of irreducibles successively cancels matching factors from any two factorizations. Therefore ℤ[i] is a unique factorization domain.
Splitting a prime p≡1 (mod 4)
Euler's criterion gives an integer t with t²≡−1 (mod p). Hence p divides (t+i)(t−i), but divides neither factor in ℤ[i]: divisibility by the rational integer p would require both coordinates, including ±1, to be divisible by p. Thus p is not prime in ℤ[i] and factors nontrivially. The norms of the two nonunit factors multiply to p², so each norm is p. Choosing one factor as π gives
Two representations N=u²+v² are identified when they differ only by swapping u,v or changing signs. A representation is p-primitive when p does not divide both u and v.
Gaussian lemma
If p≡1 (mod 4) is prime and α≥1, then 2p²ᵅ has exactly one p-primitive representation as a sum of two squares, up to the stated equivalence.
Proof
In the Gaussian integers choose a prime π with p=ππ̄. By unique factorization, every element z=u+iv of norm 2p²ᵅ has, up to a unit, the form
The condition p∣u and p∣v is equivalent to divisibility of z by p=ππ̄. It holds exactly for 1≤r≤2α−1. The remaining cases r=0 and r=2α are conjugate and yield one representation after swapping coordinates and changing signs.
Gaussian factorization
Swap conjugate factors and observe which representation as a sum of two squares they produce.
| Left column | ⇄ | Right column |
|---|---|---|
| 1 + 2i | 1 − 2i | |
| 1 + 2i | 1 − 2i | |
| 2 + 3i | 2 − 3i | |
| -18 − i | × | -18 + i |
5. Factorization of the central root
a² + j² = b² + h² = c² + g² = d² + f² = 2e²
e² + e² = 2e²Theorem
The central root e of a minimal 9/9 square has the form
where p₁,…,pᵣ are pairwise distinct primes.
Excluding primes 4k+3
Suppose a prime q≡3 (mod 4) divides e. Each of the four opposite pairs satisfies u²+v²=2e², so the preceding lemma forces q to divide both roots in every pair. Thus q divides all nine roots, contradicting minimality.
Excluding 2
If e were even, then 2e² would be divisible by 8. A sum of two squares can be divisible by 8 only when both roots are even. The four opposite-pair equations would again make every root even. Hence e is odd.
Therefore every prime divisor of e is congruent to 1 modulo 4.
At least two distinct divisors
The case e=1 is impossible: 2 has only the representation 1²+1², whereas the four pairs of distinct noncentral entries must give four distinct representations of 2e².
Now suppose e has only one distinct prime divisor. Then e=pᵅ for some p≡1 (mod 4). The four opposite pairs of noncentral entries give four distinct representations of 2p²ᵅ. By the Gaussian lemma, at most one pair is p-primitive. Thus modulo p at most one pair of opposite entries can remain nonzero.
The magic constant is 3e² and is therefore zero modulo p. Choose a row or column containing one entry of the remaining pair but not its opposite. The other two entries on that line are zero, so the line sum forces the third one to be zero as well. Hence p also divides the roots in the last pair and therefore all nine roots, again contradicting minimality.
6. The number of representations of 2e²
Let e have the proved factorization. The number of unordered positive representations 2e²=u²+v², up to signs, is
Proof
In the Gaussian factorization, for each pair πᵢ,π̄ᵢ one may independently choose the exponent of πᵢ from 0 through 2αᵢ, giving ∏(2αᵢ+1) choices before units. The standard ordered count is therefore 4∏(2αᵢ+1), including signs. The unique diagonal representation is e²+e²; it contributes four signed ordered solutions, whereas every nondiagonal unordered representation contributes eight. The formula follows.
The square itself uses five distinct representations: four opposite-entry pairs and the central pair e²+e².
7. Prime divisors of noncentral roots
Theorem
Let q≡3 (mod 4) be a prime divisor of any of the eight noncentral roots of a minimal 9/9 square. Then
The central-root theorem gives q∤e.
A corner entry
By symmetry it suffices to assume q∣a. From f²+h²=2a² and the lemma for primes 4k+3, q divides both f and h. In the coordinates m(e²,x,y), the differences f²−a²=y and h²−a²=−y give y≡0 (mod q). Since a²=e²+x≡0, we obtain x≡−e². Therefore
Since q does not divide e, the number 2 is a nonzero square modulo q.
A side entry
By symmetry assume q∣b. Use the two corner-centered progressions
If at least one of j,g is not divisible by q, the corresponding identity immediately shows that 2 is a square modulo q. If q divides both j and g, then it also divides d and f. The congruences j²=e²−x≡0 and g²=e²+y≡0 give x≡e² and y≡−e², whence f²=e²+x+y≡e². This contradicts q∣f together with q∤e. Thus 2 is again a square modulo q.
Conclusion
The supplementary law for the Legendre symbol is
For q≡3 (mod 4), the possible classes modulo 8 are 3 and 7. The number 2 is a square only in the latter class, so q≡7 (mod 8).
8. Final factorization boundary
The central root contains only primes congruent to 1 or 5 modulo 8, with at least two distinct primes. In every noncentral root, a prime divisor congruent to 3 modulo 4 can only lie in the class 7 modulo 8; primes congruent to 3 modulo 8 are excluded.
Together with the restrictions modulo 24, all nine roots are odd and not divisible by 3. These conditions are necessary but are not by themselves sufficient for the existence of a 9/9 square.