## Franklin's Magic Squares

```Here's an amusing passage from Benjamin Franklin's autobiography:

"Being one day in the country at the house of our common friend,
the late learned Mr. Logan, he showed me a folio French book
filled with magic squares, wrote, if I forget not, by one M.
Frenicle [Bernard Frenicle de Bessy], in which, he said, the
author had discovered great ingenuity and dexterity in the
management of numbers; and, though several other foreigners had
distinguished themselves in the same way, he did not recollect
that any one Englishman had done anything of the kind remarkable.
I said it was perhaps a mark of the good sense of our English
mathematicians that they would not spend their time in things
that were merely 'difficiles nugae', incapable of any useful
application."

Logan disagreed, pointing out that many of the math questions
publically posed and answered in England were equally trifling
and useless.  After some further discussion about how things of
this sort might perhaps be useful for sharpening the mind,
Franklin says

"I then confessed to him that in my younger days, having once
some leisure which I still think I might have employed more
usefully, I had amused myself in making these kind of magic
squares..."

Franklin then described an 8x8 magic square he had devised in his
youth, and the special properties it possessed.  Here is the square:

52 61  4 13 20 29 36 45
14  3 62 51 46 35 30 19
53 60  5 12 21 28 37 44
11  6 59 54 43 38 27 22
55 58  7 10 23 26 39 42
9  8 57 56 41 40 25 24
50 63  2 15 18 31 34 47
16  1 64 49 48 33 32 17

As explained by Franklin, each row and column of the square have the
common sum 260.  Also, he noted that half of each row or column sums
to half of 260.  In addition, each of the "bent rows" (as Franklin
called them) have the sum 260.  The "bent rows" are patterns of 8
numbers with any of the shapes and orientations shown below

# - - - - - - -   # - - - - - - #
- # - - - - - -   - # - - - - # -
- - # - - - - -   - - # - - # - -
- - - # - - - -   - - - # # - - -
- - - # - - - -   - - - - - - - -
- - # - - - - -   - - - - - - - -
- # - - - - - -   - - - - - - - -
# - - - - - - -   - - - - - - - -

- - - - - - - -   - - - - - - - #
- - - - - - - -   - - - - - - # -
- - - - - - - -   - - - - - # - -
- - - - - - - -   - - - - # - - -
- - - # # - - -   - - - - # - - -
- - # - - # - -   - - - - - # - -
- # - - - - # -   - - - - - - # -
# - - - - - - #   - - - - - - - #

It isn't clear from his verbal description whether Franklin was
claiming just the five parallel patterns of each of these types
that fall strictly within the square, or if he was claiming all
eight, counting those that "wrap around".  In any case, his square
does possess this property.  For example, if we shift the first
"bent row" to the left, wrapping the ends around, we have the
patterns

- - - - - - - #    - - - - - - # -    - - - - - # - -
# - - - - - - -    - - - - - - - #    - - - - - - # -
- # - - - - - -    # - - - - - - -    - - - - - - - #
- - # - - - - -    - # - - - - - -    # - - - - - - -
- - # - - - - -    - # - - - - - -    # - - - - - - -
- # - - - - - -    # - - - - - - -    - - - - - - - #
# - - - - - - -    - - - - - - - #    - - - - - - # -
- - - - - - - #    - - - - - - # -    - - - - - # - -

In addition, Franklin noted that the "shortened bent rows" plus
the "corners" also sum to 260.  An example of this pattern is
shown below:

# - # - - # - #
- # - - - - # -
# - - - - - - #
- - - - - - - -
- - - - - - - -
- - - - - - - -
- - - - - - - -
- - - - - - - -

As with the previous patterns, this template can be rotated in
any of the four directions, and shifted parallel into any of
the eight positions (with wrap-around), and the sum of the
highlighted numbers is always 260.

Finally, Franklin noted that the following two sets of eight
numbers also sum to 260

- # - - - - # -    # - - - - - - #
# - - - - - - #    - - - - - - - -
- - - - - - - -    - - - - - - - -
- - - - - - - -    - - - # # - - -
- - - - - - - -    - - - # # - - -
- - - - - - - -    - - - - - - - -
# - - - - - - #    - - - - - - - -
- # - - - - # -    # - - - - - - #

He doesn't explicitly mention it, but these patterns can also
be translated (with wrap-around), and since they are symmetrical
between horizontal and vertical, they can be translated in either
direction.

After showing off this 8x8 square to his friend, Franklin continued:

"Mr Logan then showed me an old arithmetical book in quarto,
wrote, I think, by one [Michel] Stifelius, which contained a
square of 16x16 that he said he should imagine must have been
a work of great labor; but if I forget not, it had only the
common properties of making the same sum, viz 2056, in every
row, horizontal, vertical, and diagonal.  Not willing to be
outdone by Mr. Stifelius, even in the size of my square, I
went home and made that evening the following magical square
of 16, which, besides having all the [special] properties of
hole being cut in a piece of paper of such a size as to take
in and show through it just 16 of the little squares, when
laid on the greater square, the sum of the 16 numbers so
appearing through the hole, wherever it was placed on the
greater square, should likewise make 2056.

This I sent to our friend the next morning, who, after some
days, sent it back in a letter with these words: 'I return
to thee thy astonishing or most stupendous piece of the
magical square, in which' - but the compliment is too
extravagant, and therefore, for his sake as well as my own,
I ought not to repeat it.  Nor is it necessary; for I make
no question but you will readily allow this square of 16 to
be the most magically magical of any magic square ever made
by any magician."

Both the 8x8 and the 16x16 square are reproduced in Van Doren's book,
taken from Franklin's autobiography, but Van Doren notes that "Barbeu
Dubourg, when translating Franklin's works twenty years later, found
two mistakes in the [16x16] square".  This is interesting because if
we compare the square as reproduced in Van Doren with the supposedly
correct version given in Christopher Henrich's nice discussion of
Franklin's squares in the article "Magic Squares and Linear Algebra"
(Americal Mathematical Monthly, vol 98, no 6, 1991), we find THREE
discrepancies.  However, one of them turns out to be an error in
Henrich's version, proving that even in the computer age it's still
possible to mis-transcribe a large square.

Here is what I believe to be Franklin's 16x16 square in it's true
and correct form:

200 217 232 249   8  25  40  57  72  89 104 121 136 153 168[185]
58  39  26   7 250(231)218 199 186 167 154 135 122 103  90  71
198 219 230 251   6  27  38  59  70  91 102 123 134 155 166 187
60  37  28   5 252 229 220 197 188 165 156 133 124 101  92  69
201 216 233 248   9  24  41  56  73  88 105 120 137 152 169 184
55  42  23  10 247 234 215 202 183 170 151 138 119 106  87  74
203 214 235 246  11  22  43  54  75  86 107 118 139 150 171 182
53  44  21  12 245 236 213 204 181 172 149 140 117 108  85  76
205 212 237 244  13  20  45  52  77  84 109 116 141 148 173 180
51  46  19  14 243 238[211]206 179 174 147 142 115 110  83  78
207 210 239 242  15  18  47  50  79  82 111 114 143 146 175 178
49  48  17  16 241 240 209 208 177 176 145 144 113 112  81  80
196 221 228 253   4  29  36  61  68  93 100 125 132 157 164 189
62  35  30   3 254 227 222 195 190 163 158 131 126  99  94  67
194 223 226 255   2  31  34  63  66  95  98 127 130 159 162 191
64  33  32   1 256 225 224 193 192 161 160 129 128  97  96  65

I assume the two errors found by Dubourg were at the locations in
square brackets, [211] and [185], where Franklin had written 241
and 181 respectively.  The entry in parentheses, (231), seems to
be correct in Franklin's version, but Henrich's article gives that
entry as 31.  (Henrich cites W. S. Andrews's book "Magic Squares
and Cubes" as his source, but I've checked the latter and it gives
the correct values.)

It's worth noting that neither of Franklin's squares satisfies the
main diagonal sums.  Thus, although they possess numerous interesting
"affine" properties as described in Henrich's article, they don't
strictly qualify as "magic squares" according to the common definition
of the term that includes the diagonal sums.
```