Magic squares of squares over a finite field

Document Type

Conference Proceeding

Publication Date



A magic square M over an integral domain D is a 3×3 matrix with entries from D such that the elements from each row, column, and diagonal add to the same sum. If all the entries in M are perfect squares in D, we call M a magic square of squares over D. In 1984, Martin LaBar raised an open question: “Is there a magic square of squares over the ring Z of the integers which has all the nine entries distinct?” We approach to answering a similar question when D is a finite field. We claim that for any odd prime p, a magic square over Zp can only hold an odd number of distinct entries. Corresponding to LaBar’s question, we show that there are infinitely many prime numbers p such that, over Zp, magic squares of squares with nine distinct elements exist. In addition, if p ≡ 1 (mod 120), there exist magic squares of squares over Zp that have exactly 3, 5, 7, or 9 distinct entries respectively. We construct magic squares of squares using triples of consecutive quadratic residues derived from twin primes.

Publication Title

Contemporary Mathematics

First Page Number


Last Page Number




This document is currently not available here.