Rewrite the Khajuraho magic square as follows:
Khajuraho magic square Basic magic square
7 |
12 |
1 |
14 |
7 |
h-4 |
1 |
h-2 |
||
2 |
13 |
8 |
11 |
2 |
h-3 |
8 |
h-5 |
||
16 |
3 |
10 |
5 |
h |
3 |
h-6 |
5 |
||
9 |
6 |
15 |
4 |
h-7 |
6 |
h-1 |
4 |
To construct an 20x20 panmagic square, you need the basic square and 24 extending magic squares:
7
|
h-4 | 1 | h-2 | 8 | -8 | 8 | -8 | 16 | -16 | 16 | -16 | 24 | -24 | 24 | -24 | 32 | -32 | 32 | -32 |
2 | h-3 | 8 | h-5 | 8 | -8 | 8 | -8 | 16 | -16 | 16 | -16 | 24 | -24 | 24 | -24 | 32 | -32 | 32 | -32 |
h | 3 | h-6 | 5 | -8 | 8 | -8 | 8 | -16 | 16 | -16 | 16 | -24 | 24 | -24 | 24 | -32 | 32 | -32 | 32 |
h-7 | 6 | h-1 | 4 | -8 | 8 | -8 | 8 | -16 | 16 | -16 | 16 | -24 | 24 | -24 | 24 | -32 | 32 | -32 | 32 |
40 | -40 | 40 | -40 | 48 | -48 | 48 | -48 | 56 | -56 | 56 | -56 | 64 | -64 | 64 | -64 | 72 | -72 | 72 | -72 |
40 | -40 | 40 | -40 | 48 | -48 | 48 | -48 | 56 | -56 | 56 | -56 | 64 | -64 | 64 | -64 | 72 | -72 | 72 | -72 |
-40 | 40 | -40 | 40 | -48 | 48 | -48 | 48 | -56 | 56 | -56 | 56 | -64 | 64 | -64 | 64 | -72 | 72 | -72 | 72 |
-40 | 40 | -40 | 40 | -48 | 48 | -48 | 48 | -56 | 56 | -56 | 56 | -64 | 64 | -64 | 64 | -72 | 72 | -72 | 72 |
80 | -80 | 80 | -80 | 88 | -88 | 88 | -88 | 96 | -96 | 96 | -96 | 104 | -104 | 104 | -104 | 112 | -112 | 112 | -112 |
80 | -80 | 80 | -80 | 88 | -88 | 88 | -88 | 96 | -96 | 96 | -96 | 104 | -104 | 104 | -104 | 112 | -112 | 112 | -112 |
-80 | 80 | -80 | 80 | -88 | 88 | -88 | 88 | -96 | 96 | -96 | 96 | -104 | 104 | -104 | 104 | -112 | 112 | -112 | 112 |
-80 | 80 | -80 | 80 | -88 | 88 | -88 | 88 | -96 | 96 | -96 | 96 | -104 | 104 | -104 | 104 | -112 | 112 | -112 | 112 |
120 | -120 | 120 | -120 | 128 | -128 | 128 | -128 | 136 | -136 | 136 | -136 | 144 | -144 | 144 | -144 | 152 | -152 | 152 | -152 |
120 | -120 | 120 | -120 | 128 | -128 | 128 | -128 | 136 | -136 | 136 | -136 | 144 | -144 | 144 | -144 | 152 | -152 | 152 | -152 |
-120 | 120 | -120 | 120 | -128 | 128 | -128 | 128 | -136 | 136 | -136 | 136 | -144 | 144 | -144 | 144 | -152 | 152 | -152 | 152 |
-120 | 120 | -120 | 120 | -128 | 128 | -128 | 128 | -136 | 136 | -136 | 136 | -144 | 144 | -144 | 144 | -152 | 152 | -152 | 152 |
160 | -160 | 160 | -160 | 168 | -168 | 168 | -168 | 176 | -176 | 176 | -176 | 184 | -184 | 184 | -184 | 192 | -192 | 192 | -192 |
160 | -160 | 160 | -160 | 168 | -168 | 168 | -168 | 176 | -176 | 176 | -176 | 184 | -184 | 184 | -184 | 192 | -192 | 192 | -192 |
-160 | 160 | -160 | 160 | -168 | 168 | -168 | 168 | -176 | 176 | -176 | 176 | -184 | 184 | -184 | 184 | -192 | 192 | -192 | 192 |
-160 | 160 | -160 | 160 | -168 | 168 | -168 | 168 | -176 | 176 | -176 | 176 | -184 | 184 | -184 | 184 | -192 | 192 | -192 | 192 |
The highest number in the 20x20 square is 400. Fill in 400 for h and calculate all the numbers. You get the following 20x20 panmagic square.
Panmagic 20x20 square
7 | 396 | 1 | 398 | 15 | 388 | 9 | 390 | 23 | 380 | 17 | 382 | 31 | 372 | 25 | 374 | 39 | 364 | 33 | 366 |
2 | 397 | 8 | 395 | 10 | 389 | 16 | 387 | 18 | 381 | 24 | 379 | 26 | 373 | 32 | 371 | 34 | 365 | 40 | 363 |
400 | 3 | 394 | 5 | 392 | 11 | 386 | 13 | 384 | 19 | 378 | 21 | 376 | 27 | 370 | 29 | 368 | 35 | 362 | 37 |
393 | 6 | 399 | 4 | 385 | 14 | 391 | 12 | 377 | 22 | 383 | 20 | 369 | 30 | 375 | 28 | 361 | 38 | 367 | 36 |
47 | 356 | 41 | 358 | 55 | 348 | 49 | 350 | 63 | 340 | 57 | 342 | 71 | 332 | 65 | 334 | 79 | 324 | 73 | 326 |
42 | 357 | 48 | 355 | 50 | 349 | 56 | 347 | 58 | 341 | 64 | 339 | 66 | 333 | 72 | 331 | 74 | 325 | 80 | 323 |
360 | 43 | 354 | 45 | 352 | 51 | 346 | 53 | 344 | 59 | 338 | 61 | 336 | 67 | 330 | 69 | 328 | 75 | 322 | 77 |
353 | 46 | 359 | 44 | 345 | 54 | 351 | 52 | 337 | 62 | 343 | 60 | 329 | 70 | 335 | 68 | 321 | 78 | 327 | 76 |
87 | 316 | 81 | 318 | 95 | 308 | 89 | 310 | 103 | 300 | 97 | 302 | 111 | 292 | 105 | 294 | 119 | 284 | 113 | 286 |
82 | 317 | 88 | 315 | 90 | 309 | 96 | 307 | 98 | 301 | 104 | 299 | 106 | 293 | 112 | 291 | 114 | 285 | 120 | 283 |
320 | 83 | 314 | 85 | 312 | 91 | 306 | 93 | 304 | 99 | 298 | 101 | 296 | 107 | 290 | 109 | 288 | 115 | 282 | 117 |
313 | 86 | 319 | 84 | 305 | 94 | 311 | 92 | 297 | 102 | 303 | 100 | 289 | 110 | 295 | 108 | 281 | 118 | 287 | 116 |
127 | 276 | 121 | 278 | 135 | 268 | 129 | 270 | 143 | 260 | 137 | 262 | 151 | 252 | 145 | 254 | 159 | 244 | 153 | 246 |
122 | 277 | 128 | 275 | 130 | 269 | 136 | 267 | 138 | 261 | 144 | 259 | 146 | 253 | 152 | 251 | 154 | 245 | 160 | 243 |
280 | 123 | 274 | 125 | 272 | 131 | 266 | 133 | 264 | 139 | 258 | 141 | 256 | 147 | 250 | 149 | 248 | 155 | 242 | 157 |
273 | 126 | 279 | 124 | 265 | 134 | 271 | 132 | 257 | 142 | 263 | 140 | 249 | 150 | 255 | 148 | 241 | 158 | 247 | 156 |
167 | 236 | 161 | 238 | 175 | 228 | 169 | 230 | 183 | 220 | 177 | 222 | 191 | 212 | 185 | 214 | 199 | 204 | 193 | 206 |
162 | 237 | 168 | 235 | 170 | 229 | 176 | 227 | 178 | 221 | 184 | 219 | 186 | 213 | 192 | 211 | 194 | 205 | 200 | 203 |
240 | 163 | 234 | 165 | 232 | 171 | 226 | 173 | 224 | 179 | 218 | 181 | 216 | 187 | 210 | 189 | 208 | 195 | 202 | 197 |
233 | 166 | 239 | 164 | 225 | 174 | 231 | 172 | 217 | 182 | 223 | 180 | 209 | 190 | 215 | 188 | 201 | 198 | 207 | 196 |
The 20x20 magic square is not fullly 2x2 compact. You need to swap numbers to get a most perfect 20x20 magic square.
Most perfect 20x20 magic square
39 | 396 | 1 | 366 | 31 | 388 | 9 | 374 | 23 | 380 | 17 | 382 | 15 | 372 | 25 | 390 | 7 | 364 | 33 | 398 |
2 | 365 | 40 | 395 | 10 | 373 | 32 | 387 | 18 | 381 | 24 | 379 | 26 | 389 | 16 | 371 | 34 | 397 | 8 | 363 |
400 | 35 | 362 | 5 | 392 | 27 | 370 | 13 | 384 | 19 | 378 | 21 | 376 | 11 | 386 | 29 | 368 | 3 | 394 | 37 |
361 | 6 | 399 | 36 | 369 | 14 | 391 | 28 | 377 | 22 | 383 | 20 | 385 | 30 | 375 | 12 | 393 | 38 | 367 | 4 |
79 | 356 | 41 | 326 | 71 | 348 | 49 | 334 | 63 | 340 | 57 | 342 | 55 | 332 | 65 | 350 | 47 | 324 | 73 | 358 |
42 | 325 | 80 | 355 | 50 | 333 | 72 | 347 | 58 | 341 | 64 | 339 | 66 | 349 | 56 | 331 | 74 | 357 | 48 | 323 |
360 | 75 | 322 | 45 | 352 | 67 | 330 | 53 | 344 | 59 | 338 | 61 | 336 | 51 | 346 | 69 | 328 | 43 | 354 | 77 |
321 | 46 | 359 | 76 | 329 | 54 | 351 | 68 | 337 | 62 | 343 | 60 | 345 | 70 | 335 | 52 | 353 | 78 | 327 | 44 |
119 | 316 | 81 | 286 | 111 | 308 | 89 | 294 | 103 | 300 | 97 | 302 | 95 | 292 | 105 | 310 | 87 | 284 | 113 | 318 |
82 | 285 | 120 | 315 | 90 | 293 | 112 | 307 | 98 | 301 | 104 | 299 | 106 | 309 | 96 | 291 | 114 | 317 | 88 | 283 |
320 | 115 | 282 | 85 | 312 | 107 | 290 | 93 | 304 | 99 | 298 | 101 | 296 | 91 | 306 | 109 | 288 | 83 | 314 | 117 |
281 | 86 | 319 | 116 | 289 | 94 | 311 | 108 | 297 | 102 | 303 | 100 | 305 | 110 | 295 | 92 | 313 | 118 | 287 | 84 |
159 | 276 | 121 | 246 | 151 | 268 | 129 | 254 | 143 | 260 | 137 | 262 | 135 | 252 | 145 | 270 | 127 | 244 | 153 | 278 |
122 | 245 | 160 | 275 | 130 | 253 | 152 | 267 | 138 | 261 | 144 | 259 | 146 | 269 | 136 | 251 | 154 | 277 | 128 | 243 |
280 | 155 | 242 | 125 | 272 | 147 | 250 | 133 | 264 | 139 | 258 | 141 | 256 | 131 | 266 | 149 | 248 | 123 | 274 | 157 |
241 | 126 | 279 | 156 | 249 | 134 | 271 | 148 | 257 | 142 | 263 | 140 | 265 | 150 | 255 | 132 | 273 | 158 | 247 | 124 |
199 | 236 | 161 | 206 | 191 | 228 | 169 | 214 | 183 | 220 | 177 | 222 | 175 | 212 | 185 | 230 | 167 | 204 | 193 | 238 |
162 | 205 | 200 | 235 | 170 | 213 | 192 | 227 | 178 | 221 | 184 | 219 | 186 | 229 | 176 | 211 | 194 | 237 | 168 | 203 |
240 | 195 | 202 | 165 | 232 | 187 | 210 | 173 | 224 | 179 | 218 | 181 | 216 | 171 | 226 | 189 | 208 | 163 | 234 | 197 |
201 | 166 | 239 | 196 | 209 | 174 | 231 | 188 | 217 | 182 | 223 | 180 | 225 | 190 | 215 | 172 | 233 | 198 | 207 | 164 |
This 20x20 magic square is panmagic, (fully) 2x2 compact and each 1/5 row/column/ diagonal gives 1/5 of the magic sum.
Use the Khajuraho method to construct magic squares of order is multiple of 4 from 8x8 to infinity. See 8x8, 12x12, 16x16, 20x20, 24x24, 28x28 and 32x32