Office Applications and Entertaiment, Magic Squares

Vorige Pagina Volgende Pagina Index About the Author

16.0Special Magic Squares, Squares of Squares

In contradiction to Bimagic Squares, as discussed in previous section, Magic Squares of Squares are not magic when its entries are not squared.

16.1Squares of Squares (3 x 3)

Up to now (Jan. 2016), nobody has been able to construct a 3th order Magic Square of Squares, nor proven that it is impossible to construct such a square.

Semi Magic Squares have been developed over the centuries and discussed in many papers.

This section describes a few of these methods and illustrates also how Semi Magic Squares of Squares can be found by means of Conditional Sequential Searching.

16.1.1 Semi Magic, Edouard Lucas, Six Magic Lines

The first example of a Semi Magic Square of the 3th order, as published by Eduoard Lucas in 1876, was based on following formulas:

(p2 + q2 r2 s2)2

[2(qr + ps)]2

[2(qs pr)]2

[2(qr ps)]2

(p2 q2 + r2 s2)2

[2(rs + pq)]2

[2(qs + pr)]2

[2(rs pq)]2

(p2 q2 r2 + s2)2

as described in an article published by Christian Boyer in The Mathematical Intelligencer (Vol. 27, N. 2, 2005, pages 52-64).

The 3 rows and 3 columns sum to the Magic Sum s1 = (p2 + q2 + r2 + s2)2.

Attachment 16.1.1 shows the occurring Magic Sums and corresponding distinct variable values {ai2} while varying the parameters p, q, r and s over the range {1 ... 8}.

Based on these data, 2304 (= 32 * 72) Semi Magic Squares with six Magic Lines of the Lucas Family could be found.

Attachment 16.1.2 shows one (occasionally two) unique Semi Magic Square of Squares for each occurring Magic Sum.

16.1.2 Semi Magic, Edouard Lucas, Seven Magic Lines

Semi Magic Squares with seven Magic Lines of the Lucas Family will occur for higher values of p, q, r and s.

Attachment 16.1.3 shows the occuring Magic Sums and corresponding distinct variable values {ai2} while varying the parameters p, q, r and s over the range {1 ... 33} for seven Magic Lines.

Based on these data, 216 (= 9 * 24) Semi Magic Squares with seven Magic Lines of the Lucas Family could be found.

Attachment 16.1.4 shows one unique Semi Magic Square of Squares for each occurring Magic Sum.

16.1.3 Semi Magic, Linear Equations, Six Magic Lines

Semi Magic Squares of Squares can also be generated with comparable routines as used for Prime Numbers but now based on distinct squared variable values {ai2} with i = 1 ... n.

As the Magic Sum will depend from the selected variable values, the Magic Sum has to be made variable as well.

The equations defining 3th order Semi Magic Squares with six Magic Lines, are:

a(7) = s1 - a(8) - a(9)
a(4) = s1 - a(5) - a(6)
a(3) =    - a(6) + a(7) + a(8)
a(2) = s1 - a(5) - a(8)
a(1) =      a(5) + a(6) - a(7)

with a(9), a(8), a(6) and a(5) the independent variables and a(j) = ai2 for j = 1 ... 9, i = 1 ... n.

Based on the equations above a routine has been written to generate 3th order Semi Magic Squares of Squares with at least six Magic Lines (ref. SqrsSqrs3a).

A collection of 8376 Semi Magic Squares could be found for the range ai = 0 ... 160, which includes:

  • The Lucas Family for six Magic Lines for the range (ref. Attachment 16.1.2);
  • The Lucas Squares with seven Magic Lines for the Magic Sum 21609 (ref. Attachment 16.1.4);
  • A variety of other Semi Magic Squares (ref. Attachment 16.1.5 for one (occasionally two or three) unique squares for each occurring Magic Sum).

The majority of the Magic Sums found for Squares not belonging to the Lucas Family are not squared numbers, although occasionally remarkably close (e.g. 10011).

The first Semi Magic Square of squared primes occurs for the Magic Sum 5691 and was previously published by Jean-Claude Rosa (2006).

16.1.4 Semi Magic, Linear Equations, Seven Magic Lines

The equations defining 3th order Semi Magic Squares with seven Magic Lines, are:

a(7) =      s1            -     a(8) -     a(9)
a(5) = -    s1 +     a(6) +     a(8) + 2 * a(9)
a(4) =  2 * s1 - 2 * a(6) -     a(8) - 2 * a(9)
a(3) =      s1 -     a(6)            -     a(9)
a(2) =  2 * s1 -     a(6) - 2 * a(8) - 2 * a(9)
a(1) = -2 * s1 + 2 * a(6) + 2 * a(8) + 3 * a(9)

with a(9), a(8) and a(6) the independent variables and a(j) = ai2 for j = 1 ... 9, i = 1 ... n.

Based on the equations above a routine has been written to generate 3th order Semi Magic Squares of Squares with seven Magic Lines (ref. SqrsSqrs3b).

However, the only Semi Magic Squares with seven Magic Lines found for the range ai = 1 ... 1143 are the Lucas Family (ref. Attachment 16.1.4).

16.1.5 Magic, Eight Magic Lines, Squared Entries >= 7

As mentioned in Section 16.1 above, up to now nobody has been able to construct a 3th order Magic Square of Squares.

However the existance of Magic Squares with eight Magic Lines but only seven Squared Entries has been proven.

The linear equations defining 3th order Magic Squares are:

a(7) =      s1   - a(8) -     a(9)
a(6) =  4 * s1/3 - a(8) - 2 * a(9)
a(5) =      s1/3
a(4) = -2 * s1/3 + a(8) + 2 * a(9)
a(3) = -    s1/3 + a(8) +     a(9)
a(2) =  2 * s1/3 - a(8)
a(1) =  2 * s1/3 - a(9)

with a(9) and a(8) the independent variables and a(j) = ai2 for j = 1 ... 9, i = 1 ... n.

A 3th order Magic Square consists of a center element a(5) and 4 center symmetric pairs, with a magic sum s1 = 3 * a(5).

Based on the occuring pairs of squares for a certain range, corresponding Magic Sums, center elements and variable values {ai} can be determined (ref. Attachment 16.1.6).

A routine has been written (ref. SqrsSqrs3c) to search for 3th order Magic Squares of Squares with eight Magic Lines and seven or more squared entries based on the equations and data described above.

The first Magic Square with eight Magic Lines and seven squared entries occurs for the Magic Sum 541875 and was previously published by Andrew Brenner (2005).

For the range ai = 1 ... 104 only k2 - multiples of this first occuring square could be found (ref. Attachment 16.1.7).

16.1.6 Semi Magic, Center Element a(5) = s1/3

It should be noticed that none of the Semi Magic Squares shown in the atachments listed in Section 16.1.3 above contain an element a(j) = s1/3.

Based on the equations for Semi Magic Squares with six Magic Lines and data as contained in Attachment 16.1.6, Semi Magic Squares with center element a(5) = s1/3 can be generated for the range ai = 1 ... 104 (ref. SqrsSqrs3d).

Attachment 16.1.8 shows for every applicable Magic Sum the first occuring Semi Magic Square with a(5) = s1/3.

The squares are k2 - multiples of the first square which was previously published by Lee Morgenstern (2009).

16.1.7 Summary

The obtained results regarding the miscellaneous types of order 3 Semi Magic Squares of Squares as deducted and discussed in previous sections are summarized in following table:

Main Characteristics

Original Author

Subroutine

Results

Semi Magic, 6 Magic Lines

Eduoard Lucas

SqrsSqrs3a

Attachment 16.1.2

Semi Magic, 6 Magic Lines

-

Attachment 16.1.5

Semi Magic, 7 Magic Lines

Eduoard Lucas

SqrsSqrs3b

Attachment 16.1.4

Semi Magic, 8 Magic Lines, 7 Squared Entries

Andrew Brenner

SqrsSqrs3c

Attachment 16.1.7

Semi Magic, 6 Magic Lines, Center = s1/3

Lee Morgenstern

SqrsSqrs3d

Attachment 16.1.8

16.2Squares of Squares (4 x 4)

16.2.1 Magic, Calculation, Leonhard Euler

The first four Magic Squares of the 4th order, as send by Leonhard Euler in 1770 to Joseph Lagrange, were based on following formulas (according to the source mentioned above):

(+ap+bq+cr+ds)2

(+arbscp+dq)2

(asbr+cq+dp)2

(+aqbp+csdr)2

(aq+bp+csdr)2

(+as+br+cq+dp)2

(+arbs+cpdq)2

(+ap+bqcrds)2

(+ar+bscpdq)2

(ap+bqcr+ds)2

(+aq+bp+cs+dr)2

(+asbrcq+dp)2

(as+brcq+dp)2

(aqbp+cs+dr)2

(ap+bq+crds)2

(+ar+bs+cp+dq)2

The 3 rows and 3 columns sum to the Magic Sum s1, and two supplemental conditions:

  • pr + qs = 0;

  • a / c = [ d(pq + rs) b(ps + qr)] / [b(pq + rs) + d(ps + qr)].

ensure that also the two magic diagonals sum to s1 = (a2 + b2 + c2 + d2)(p2 + q2 + r2 + s2).

Attachment 16.2.1 shows the occurring Magic Sums and corresponding distinct variable values {ai2} while varying the parameters a, b, c, d, p, q, r over the range {1 ... 9} for s = -4.

Based on these data 320 (= 10 * 32) Magic Squares could be found.

Attachment 16.2.2 shows one (occasionally two) unique Magic Square of Squares for each occurring Magic Sum.

For (a, b, c, d, p, q, r, s) = (2, k, 5, 0, 1, 2, 8, 4) the formula's can be simplified to:

(2k + 42)2

(4k + 11)2

(8k 18)2

(k + 16)2

(k 24)2

(8k + 2)2

(4k + 21)2

(2k 38)2

(4k 11)2

(2k 42)2

(k 16)2

(8k + 18)2

(8k 2)2

(k + 24)2

(2k + 38)2

(4k 21)2

and will result in Magic Squares with s1 = 85 * (k2 + 29) and distinct integers for k = 3, 5, 8, ... (ref. Attachment 16.2.2)

For (a, b, c, d, p, q, r, s) = ((5, k, 9, 0, 2, 3, 6, 4) the formula's can be simplified to:

(3k + 64)2

(4k + 12)2

(6k 47)2

(2k + 21)2

(2k 51)2

(6k + 7)2

(4k + 48)2

(3k 44)2

(4k 12)2

(3k 64)2

(2k 21)2

(6k + 47)2

(6k 7)2

(2k + 51)2

(3k + 44)2

(4k 48)2

and will result in Magic Squares with s1 = 65 * (k2 + 106) and distinct integers for k = 2, 3, 5, ... (ref. Attachment 16.2.2)

16.2.2 Magic, Linear Equations

Magic Squares of Squares can also be generated with comparable routines as used for Semi Magic Squares of Squares.

The linear equations defining 4th order Magic Squares of Squares are:

a(13) =  s1 - a(14) - a(15) -   a(16) 
a( 9) =  s1 - a(10) - a(11) -   a(12) 
a( 7) =       a( 8) - a(10) +   a(12) -   a(13) +   a(16) 
a( 6) =  s1 - a( 8) - a(11) -   a(12) +   a(13) -   a(16) 
a( 5) =     - a( 8) + a(10) +   a(11) 
a( 4) =  s1 - a( 7) - a(10) -   a(13) 
a( 3) = -s1 - a( 8) + a( 9) + 2*a(10) + 2*a(13) +   a(14) 
a( 2) =       a( 8) - a( 9) - 2*a(10) +   a(15) + 2*a(16) 
a( 1) =       a( 8) + a(12) -   a(13) 

with a(16), a(15), a(14), a(12), a(11), a(10) and a(8) the independent variables and a(j) = ai2 for j = 1 ... 16, i = 1 ... n.

An optimized guessing routine (SqrsSqrs4a), produced for the range ai = 0 ... 87, 512 (= 16 * 32) Magic Squares of Squares. The unique square(s) for each occurring Magic Sum are shown in Attachment 16.2.3.

It should be noted that the Magic Squares of Squares with the Magic Sums s1 = 2823, 4875, 6462, 7150 (2), 7735 and 9775 are not a part of the Euler Family (ref. Attachment 16.2.2).

16.2.3 Summary

The obtained results regarding the miscellaneous types of order 4 Magic Squares of Squares as deducted and discussed in previous sections are summarized in following table:

Main Characteristics

Original Author

Subroutine

Results

Magic Squares of Squares

Leonhard Euler

-

Attachment 16.2.2

Magic Squares of Squares

-

SqrsSqrs4a

Attachment 16.2.3


Vorige Pagina Volgende Pagina Index About the Author