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