Construction methods


Here is the secret used to obtain tetra and pentamagic squares, the Viricel-Boyer method for computing your own multimagic squares:

 

Col 0

Col 1

Col 2

Col i

Li 0

0 = (0,0)

N1 = (a,b)

2@(a,b)

i@(a,b)

Li 1

N2 = (c,d)

(a,b) & (c,d)

2@(a,b) & (c,d)

i@(a,b) & (c,d)

Li j

j@(c,d)

(a,b) & j@(c,d)

2@(a,b) & j@(c,d)

i@(a,b) & j@(c,d)

The (a,b) notations indicates a number decomposed in base n (n being the square order).

Now take the example of our tetramagic square. See its top left corner:

    N1 = 139938 = 273*512(square order) + 162      So (a,b) = (273,162)
    N2 = 140551 = 274*512(square order) + 263      So (c,d) = (274,263)

We do not know the true rules which permit us to know if a pair N1 and N2 will generate a multimagic square. But you will find pairs, other than 139938/140551, which also give 512th-order tetramagic squares: the smallest are 535/1103, 535/1145, and so on...


Numeral addition &.

What we call here the numeral addition « & » is well known by software developers : it is the EXCLUSIVE OR

    139938 =          100010001010100010 (in base 2)
    140551 =          100010010100000111 (in base 2)
    139938 & 140551 = 000000011110100101 (in base 2) = 1957 (in base 10).

And 1957 is really the number that we find in the tetramagic square seen above, under the 139938 number.


Numeral multiplication @.

We will now compute the penultimate cell of the row 0 of our tetramagic square.

It is equal to 510@(273,162). We will start by computing 510@273:

    510 =   111111110 (in base 2)
    273 =   100010001 (in base 2)

The numeral multiplication is computed like the classical multiplication that we learn at school, except that the final addition is not done normally, but instead by numeral addition (so binary « exclusive or » ). It gives:

In order to conclude the multiplication and so that the number remains the same size as its two operands (lower than 512, so 9 bits coded), we carry out a supplemental numeral additon of the left and right parts of the result, like this:

So, the result of 510@273 is 11101110 in base 2, equal to 238 in our good old base 10. When, by the same method, we compute 510@162, we find 349.

So, the result of 510@(273,162) is (238,349) = 238*512 + 349 = 122205.

Have a look at the top right corner of our tetramagic square. We recognize this number in the penultimate cell of the row 0:


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