## Associative

If the order M square and the order N square are both associative, the order MN composite square is also associative.

### Proof

Consider squares A, B and the A-B composite C:
(The range of square B is given as 0 to N2-1 to avoid having to subtract 1 from the B numbers at each reference).

```                       A             B          C
-----         -----      ------
order:                 M             N        Q = MN
cells:                ai,j          bi,j        ci,j
numbers:             1..M2        0..N2-1      1..Q2

then                      ci,j = air,jr + M2biq,jq

where i, j  are 0 .. Q-1
ir,jr are the remainders of the division of i,j by M
iq,jq are the quotients  of the division of i,j by M

let k = Q-1-i, l = Q-1-j,
TM be the order M complementary pair sum = M2+1
TN be the order N complementary pair sum = N2-1
TQ be the order Q complementary pair sum = Q2+1

then the center symmetric pair:
ci,j + ck,l =
air,jr + M2biq,jq + akr,lr + M2bkq,lq =
(air,jr + akr,lr) + M2(biq,jq + bkq,lq) =
TM + M2TN = (M2+1) + M2(N2-1) = M2N2+1 = Q2+1 = TQ
```

For example, a 4x4 associative square A, a 3x3 associative square B, and the 12x12 A-B composite associative square C: .txt

```         A             B                                C
---           ---                             -----
1  8 12 13     7  0  5     113 120 124 125    1   8  12  13   81  88  92  93
14 11  7  2     2  4  6     126 123 119 114   14  11   7   2   94  91  87  82
15 10  6  3     3  8  1     127 122 118 115   15  10   6   3   95  90  86  83
4  5  9 16                 116 117 121 128    4   5   9  16   84  85  89  96

33  40  44  45   65  72  76  77   97 104 108 109
46  43  39  34   78  75  71  66  110 107 103  98
47  42  38  35   79  74  70  67  111 106 102  99
36  37  41  48   68  69  73  80  100 101 105 112

49  56  60  61  129 136 140 141   17  24  28  29
62  59  55  50  142 139 135 130   30  27  23  18
63  58  54  51  143 138 134 131   31  26  22  19
52  53  57  64  132 133 137 144   20  21  25  32

order:   M = 4        N = 3                        Q = MN = 12

1 .. 16       0 .. 8                        1 .. 144

the center symmetric pair:

c0,0 + c11,11 = (a0,0 + M2b0,0) + (a3,3 + M2b2,2)
c0,0 + c11,11 = (a0,0 + a3,3)   + M2(b0,0 + b2,2)
113 + 32   =    (1 + 16)     +   42(7 + 1)
145     =       17        +      128
```

## Pandiagonal

If the order M square and the order N square are both pandiagonal, the order MN composite square is also pandiagonal.

### Proof

Consider the squares A, B and the A-B composite C:
(The range of square B is given as 0 to N2-1 to avoid having to subtract 1 from the B numbers at each reference).

```                       A             B          C
-----         -----      ------
order:                 M             N        Q = MN
cells:                ai,j          bi,j        ci,j
numbers:             1..M2        0..N2-1      1..Q2

then                      ci,j = air,jr + M2biq,jq

where i, j  are 0 .. Q-1
ir,jr are the remainders of the division of i,j by M
iq,jq are the quotients  of the division of i,j by M

let pr be the remainder of the division of Q-1 by M
pq be the quotient  of the division of Q-1 by M
SM be the order M magic sum = M(M2+1)/2
SN be the order N magic sum = N(N2-1)/2
SQ be the order Q magic sum = Q(Q2+1)/2

then the main \diagonal sum is:

c0,0 + c1,1 +  ... + cQ-1,Q-1 =

(a0,0 + M2b0,0) + (a1,1 + M2b0,0) + ... + (apr,pr + M2b0,0) +
(a0,0 + M2b1,1) + (a1,1 + M2b1,1) + ... + (apr,pr + M2b1,1) +
...               ...                     ...
(a0,0 + M2bpq,pq) + (a1,1 + M2bpq,pq) + ... + (apr,pr + M2bpq,pq) =

Na0,0 + Na1,1 + ... + Napr,pr +
M(M2b0,0) + M(M2b1,1) + ... + M(M2bpq,pq) =

N(a0,0 + a1,1 + ... + apr,pr) +
M3(b0,0 + b1,1 + ... + bpq,pq) =

N(SM) + M3(SN) = N(M(M2+1)/2) + M3(N(N2-1)/2) =
(M3N + MN + M3N3 - M3N)/2 = MN((MN)2+1)/2 = Q(Q2+1)/2 = SQ

and the second \diagonal sum is:

c1,0 + c2,1 +  ... + c0,Q-1 =

(a1,0 + M2b0,0) + (a2,1 + M2b0,0) + ... + (apr,pr-1 + M2b0,0) +
(a0,pr + M2b1,0) +
(a1,0 + M2b1,1) + (a2,1 + M2b1,1) + ... + (apr,pr-1 + M2b1,1) +
(a0,pr + M2b2,1) +
...               ...                     ...
(a1,0 + M2bpq,pq) + (a2,1 + M2bpq,pq) + ... + (apr,pr-1 + M2bpq,pq) +
(a0,pr + M2b0,pq) =

Na1,0 + Na2,1 + ... + Napr,pr-1 +
Na0,pr +
M2b1,0 + M2b2,1 + ... + M2b0,pq +
(M-1)(M2b0,0) + (M-1)(M2b1,1) + ... + (M-1)(M2bpq,pq) =

N(a1,0 + a2,1 + ... + apr,pr-1 + a0,pr) +
M2(b1,0 + b2,1 + ... + b0,pq) +
(M-1)M2(b0,0 + b1,1 + ... + bpq,pq) =

N(SM) + M2(SN) + (M-1)M2(SN) =
N(SM) + M3(SN) = N(M(M2+1)/2) + M3(N(N2-1)/2) =
(M3N + MN + M3N3 - M3N)/2 = MN((MN)2+1)/2 = Q(Q2+1)/2 = SQ

and so on for the other \diagonals and similarly for the /diagonals.
```

For example, a 4x4 pandiagonal square A, a 5x5 pandiagonal square B, and the 20x20 A-B composite pandiagonal square C: .txt

```                                A                 B
---              -----
6  3 16  9      0  6 12 18 24
15 10  5  4     13 19 20  1  7
1  8 11 14     21  2  8 14 15
12 13  2  7      9 10 16 22  3
17 23  4  5 11

order:                        M = 4             N = 5
numbers:                     1 .. 16           0 .. 24

C
---------------------
6   3  16   9  102  99 112 105  198 195 208 201  294 291 304 297  390 387 400 393
15  10   5   4  111 106 101 100  207 202 197 196  303 298 293 292  399 394 389 388
1   8  11  14   97 104 107 110  193 200 203 206  289 296 299 302  385 392 395 398
12  13   2   7  108 109  98 103  204 205 194 199  300 301 290 295  396 397 386 391

214 211 224 217  310 307 320 313  326 323 336 329   22  19  32  25  118 115 128 121
223 218 213 212  319 314 309 308  335 330 325 324   31  26  21  20  127 122 117 116
209 216 219 222  305 312 315 318  321 328 331 334   17  24  27  30  113 120 123 126
220 221 210 215  316 317 306 311  332 333 322 327   28  29  18  23  124 125 114 119

342 339 352 345   38  35  48  41  134 131 144 137  230 227 240 233  246 243 256 249
351 346 341 340   47  42  37  36  143 138 133 132  239 234 229 228  255 250 245 244
337 344 347 350   33  40  43  46  129 136 139 142  225 232 235 238  241 248 251 254
348 349 338 343   44  45  34  39  140 141 130 135  236 237 226 231  252 253 242 247

150 147 160 153  166 163 176 169  262 259 272 265  358 355 368 361   54  51  64  57
159 154 149 148  175 170 165 164  271 266 261 260  367 362 357 356   63  58  53  52
145 152 155 158  161 168 171 174  257 264 267 270  353 360 363 366   49  56  59  62
156 157 146 151  172 173 162 167  268 269 258 263  364 365 354 359   60  61  50  55

278 275 288 281  374 371 384 377   70  67  80  73   86  83  96  89  182 179 192 185
287 282 277 276  383 378 373 372   79  74  69  68   95  90  85  84  191 186 181 180
273 280 283 286  369 376 379 382   65  72  75  78   81  88  91  94  177 184 187 190
284 285 274 279  380 381 370 375   76  77  66  71   92  93  82  87  188 189 178 183

order:                                         Q = MN = 20
numbers:                                         1 .. 400

the main \diagonal sum is:

c0,0 + c1,1 +  ... + c19,19 =

6 + 10 + 11 + 7 + 310 + 314 + 315 + 311 + 134 + 138
+ 139 + 135 + 358 + 362 + 363 + 359 + 182 + 186 + 187 + 183 =

(a0,0 + 42b0,0) + (a1,1 + 42b0,0) + ... + (a3,3 + 42b0,0) +
(a0,0 + 42b1,1) + (a1,1 + 42b1,1) + ... + (a3,3 + 42b1,1) +
...               ...                     ...
(a0,0 + 42b4,4) + (a1,1 + 42b4,4) + ... + (a3,3 + 42b4,4) =

5a0,0 + 5a1,1 + ... + 5a3,3 +
4(42b0,0) + 4(42b1,1) + ... + 4(42b4,4) =

5(a0,0 + a1,1 + ... + a3,3) +
43(b0,0 + b1,1 + ... + b4,4) =

5(6 + 10 + 11 + 7) + 43(0 + 19 + 8 + 22 + 11) =
5(34)              + 64(60) =
4010 = SQ

and the second \diagonal sum is:

c1,0 + c2,1 +  ... + c0,19 =

15 + 8 + 2 + 217 + 319 + 312 + 306 + 41 + 143 + 136
+ 130 + 265 + 367 + 360 + 354 + 89 + 191 + 184 + 178 + 393 =

(a1,0 + 42b0,0) + (a2,1 + 42b0,0) + (a3,2 + 42b0,0) +
(a0,3 + 42b1,0) +
(a1,0 + 42b1,1) + (a2,1 + 42b1,1) + (a3,2 + 42b1,1) +
(a0,3 + 42b2,1) +
...               ...                     ...
(a1,0 + 42b4,4) + (a2,1 + 42b4,4) + (a3,2 + 42b4,4) =
(a0,3 + 42b0,4) =

5a1,0 + 5a2,1 + 5a3,2 +
5a0,3 +
42b1,0 + 42b2,1 + ... + 42b0,4 +
3(42b0,0) + 3(42b1,1) + ... + 3(42b4,4) =

5(a1,0 + a2,1 + a3,2 + a0,3) +
42(b1,0 + b2,1 + b3,2 + b4,3 + b0,4) +
3(42(b0,0 + b1,1 + b2,2 + b3,3 + b4,4) =

5(15 + 8 + 2 + 9) + 42(13 + 2 + 16 + 5 + 24) + 3(42(0 + 19 + 8 + 22 + 11)) =

5(34)             + 16(60)                              + 48(60) =
5(34)                                + 64(60) =
4010 = SQ

and so on for the other \diagonals and similarly for the /diagonals.
```

## Bimagic

If the order M square and the order N square are both 2-multimagic, the order MN composite square is also 2-multimagic.

### Proof

Consider squares A, B and the A-B composite C:
(The range of square B is given as 0 to N2-1 to avoid having to subtract 1 from the B numbers at each reference).

```                       A             B          C
-----         -----      ------
order:                 M             N        Q = MN
cells:                ai,j          bi,j        ci,j
numbers:             1..M2        0..N2-1      1..Q2

then                      ci,j = air,jr + M2biq,jq

where i, j  are 0 .. Q-1
ir,jr are the remainders of the division of i,j by M
iq,jq are the quotients  of the division of i,j by M

let pr be the remainder of the division of Q-1 by M
pq be the quotient  of the division of Q-1 by M
SM be the order M magic sum = M(M2+1)/2
SN be the order N magic sum = N(N2-1)/2
SQ be the order Q magic sum = Q(Q2+1)/2
S2M be the order M bimagic sum = M(M2+1)(2M2+1)/6
S2N be the order N bimagic sum sum = N(N2-1)(2N2-1)/6
S2Q be the order Q bimagic sum sum = Q(Q2+1)(2Q2+1)/6

then the first row bimagic sum is:

c0,02 + c0,12 +  ... + c0,Q-12 =

(a0,0 + M2b0,0)2 + (a0,1 + M2b0,0)2 + ... + (a0,pr + M2b0,0)2 +
(a0,0 + M2b0,1)2 + (a0,1 + M2b0,1)2 + ... + (a0,pr + M2b0,1)2 +
...               ...                     ...
(a0,0 + M2b0,pq)2 + (a0,1 + M2b0,pq)2 + ... + (a0,pr + M2b0,pq)2 =

a0,02 + 2a0,0(M2b0,0) + (M2b0,0)2 + ...
a0,02 + 2a0,0(M2b0,1) + (M2b0,1)2 + ...
...
a0,02 + 2a0,0(M2b0,pq) + (M2b0,pq)2 + ... =

N(a0,02 + a0,12 + ... + a0,pr2) +
2a0,0M2(b0,0 + b0,1 + ... + b0,pq) +
2a0,1M2(b0,0 + b0,1 + ... + b0,pq) +
...
2a0,prM2(b0,0 + b0,1 + ... + b0,pq) +
M(M2)2(b0,02 + b0,12 + ... + b0,pq2) =

N(S2M) + 2M2(SM)(SN) + M5(S2N) =
NM(M2+1)(2M2+1)/6 + 2M3N((M2+1)/2)((N2-1)/2 + M5N((N2-1)(2N2-1)/6 =
MN(2M4N4+3M2N2+1)/6 = MN(M2N2+1)(2M2N2+1)/6 =
Q(Q2+1)(2Q2+1)/6 = S2Q

and so on for the other row bimagic sums,
and similarly for the column and main diagonal bimagic sums.
```

## Pi Are Squared

Not another attempt at squaring the circle!

The verse, attributed to Adam C. Orr, is taken from Martin Gardner's The SCIENTIFIC AMERICAN book of Mathematical Puzzles & Diversions, 1959, Simon and Schuster, New York. The Adam C. Orr submission is in The Literary Digest, January 20, 1906, page 84. "The great immortal Syracusan" was Archimedes.

The word lengths give the digits of π to 30 decimal places.

Note: The image is a portion of the square coded in file Text.html by program CompositeCalligraphy. The file was edited to change the title to π r squared.