Semi-Magic Hourglass
by Lee Morgenstern, December 2011.


A magic hourglass is a magic square having 7 square entries in an hourglass-like formation where the smallest and largest entries are among the squares.
A semi-magic hourglass is a 6-square subset of the magic hourglass where the largest entry is a non-square.
Searching for a magic hourglass by generating semi-magic hourglasses and then testing the 7th entry for a square leads to interesting results.
If you try to speed up the test for a square by rejecting quadratic non-residues, it doesn't seem to speed up very much.
This is partly because of the following theorem.

Theorem.  The 7th entry of a semi-magic hourglass is always a quadratic residue modulo 8, 3, 5, 7, and 11.

Another part of the reason is that while the 7th entry is sometimes a quadratic non-residue modulo larger primes, it isn't often enough to speed up the square testing very much.  The 7th entry is a quadratic residue modulo many small primes for most of the cases.
In fact, you don't have to search very far to find cases where the 7th entry is a quadratic residue modulo all primes less than a given prime.

Here is the semi-magic hourglass having the smallest central square. The 7th entry is a quadratic residue modulo 8,3,5,7,11; -- and also 13.

 959^2    37^2  1105^2
 -----   845^2  ------
 455^2  1426681  713^2          (1426681 = 167 x 8543)

Smallest semi-magic hourglass where the 7th entry is a quadratic residue modulo every prime up to 17:

 959^2    19^2  1231^2
 -----   901^2  ------
 329^2  1623241  839^2          (1623241 = 367 x 4423)

Smallest semi-magic hourglass where the 7th entry is a quadratic residue modulo every prime up to 19 and up to 23.

 1519^2    367^2  1955^2
 ------   1445^2  ------
  595^2  4041361  1367^2        (4041361 is a prime)

Smallest semi-magic hourglass where the 7th entry is a quadratic residue modulo every prime up to 29 and up to 31 and up to 37.

 4795^2   1423^2   5989^2
 ------   4505^2   ------
 2173^2  38565121  4195^2       (38565121 = 7 x 977 x 5639)

Smallest semi-magic hourglass where the 7th entry is a quadratic residue modulo every prime up to 41 and up to 43.

 51721^2     2851^2   65959^2
 -------    48421^2   -------
 18401^2  4681058281  44879^2   (4681058281 is a prime)

Smallest semi-magic hourglass where the 7th entry is a quadratic residue modulo every prime up to 47.

 61993^2    14323^2   84377^2
 -------    61013^2   -------
 18047^2  7240024009  60017^2   (7240024009 = 61169 x 118361)


If the 7th entry were a quadratic residue modulo all primes, then it would be a square and you would have a magic hourglass.
How close can you get to a magic hourglass from a semi-magic hourglass?

Here is a semi-magic hourglass (not necessarily the smallest) where the 7th entry is a quadratic residue modulo every prime up to 59.

 42743545^2      2115907^2     58647701^2
 ----------     41916745^2     ----------
  8629843^2  3509549960357401  41073305^2           (3509549960357401 is a prime)

7th entry is a quadratic residue modulo every prime up to 61.

 97492055^2      42940127^2     97810811^2
 ----------      83497525^2     ----------
 66156773^2  12099818855475121  66625615^2          (12099818855475121 = 31 x
390316737273391)

7th entry is a quadratic residue modulo every prime up to 79.

 8015602315^2      6122160269^2      8823947533^2
 ------------      7737199685^2      ------------
 6470430269^2  82247671571806046089  7448398315^2   (82247671571806046089 =
7 x 3527 x 10779169 x 309054329)

Does there exist a prime such that the 7th entry in all semi-magic hourglasses is never a quadratic residue?
If so, then that will prove that no magic hourglass exists. Based upon the above trend, that doesn't seem likely. On the other hand, there are an infinite number of primes.


Return to the home page http://www.multimagie.com