Franklin squares of order n have these requirements:
As such, the squares are semi-magic, (the sum of each main diagonal is not required to be the magic constant). There are Franklin squares for all doubly even orders except 4 and 12.
And, for orders 8k, k = 1,2,3,... there are Franklin magic squares, i.e., for which the sum of each main diagonal is the magic constant. FranklinMagicSquares makes these squares.
Franklin8 makes all the order 8 Franklin squares. The construction is based on the method given by Hurkens.
There are no Franklin magic squares of order 8k + 4, k = 0,1,2,3,... .
When the below proof was announced, (January, 2012), Miguel Angel Amela
From the properties of a Franklin square plus the main diagonal sums, it can be shown that for a Franklin magic square:
Such a quarter square cannot exist when its order is singly even.
We can apply Planck's proof to a quarter of the square, to show that it cannot be pandiagonal. Let the order of this quarter square be 2m. Its magic constant is half that of the full square = Σ/2 = m(16m2+1). Then the sum of each of Planck's four species of cells is (m/2)(Σ/2) = 8m4 + m2/2. If m is odd this cannot be, because m2/2 is fractional.
Hurkens analysis shows that Franklin square properties are preserved under these transformations:
. permutation of n/4: odd rows 1 .. n/2-1 even rows 2 .. n/2 odd rows n/2+1 .. n-1 even rows n/2+2 .. n odd columns 1 .. n/2-1 even columns 2 .. n/2 odd columns n/2+1 .. n-1 even columns n/2+2 .. n . exchanging all n/4: odd rows 1 .. n/2-1 with odd rows n/2+1 .. n-1 even rows 2 .. n/2 with even rows n/2+2 .. n odd columns 1 .. n/2-1 with odd columns n/2+1 .. n-1 even columns 2 .. n/2 with even columns n/2+2 .. n
So, each Franklin square can be transformed into (n/4)!824 or:
squares. For order 8, that is 4096; for order 16, it is 1,761,205,026,816.
Franklin square properties are also preserved by complementing the square. However, this will sometimes not double the number because some Franklin squares are associative and some are side-to-side symmetric, and squares of these types are self-complementary.
It is useful to define a principal or standard form for all the Franklin squares that can be transformed into each other. The form outlined by Hurkens in the search for order 12 Franklin squares is defined by first row and first column tuples x = x0, ... , xn-1 and y = y0, ... , yn-1. For convenience, every second element, (starting with x1 and y1), is the complement of the actual number. The tuples then have these properties:
Program Hurkens puts Franklin squares in principal form. Program Frenicle can then be used on the output file to remove duplicates. For order 8 Franklin squares, this reduces the 368,640 magic to 90 and the 737,280 semimagic to 180. Note that Frénicle form may reverse property 8 above.
Amela, Miguel Angel "Structured 8 x 8 Franklin Squares" http://www.region.com.ar/amela/franklinsquares/
Heinz, Harvey "Franklin Squares" http://www.magic-squares.net/franklin.htm
Hurkens, C.A.J. "Plenty of Franklin Magic Squares, but none of order 12"
Hurkens, Cor "Constructing Franklin Magic Squares" http://www.win.tue.nl/~wscor/Magic/mag.pdf
Morris, Donald "Best Franklin Squares" http://www.bestfranklinsquares.com/
Pasles, Paul C. "Franklin Magic Square" http://www.pasles.org/Franklin.html
Planck, C. "PANDIAGONAL MAGICS OF ORDERS 6 AND 10 WITH MINIMAL NUMBERS."
Schindel, Daniel, Matthew Rempel and Peter Loly "Enumerating the bent diagonal squares
of Dr Benjamin Franklin FRS"