### Panmagic (and 7x7 compact) 21x21 square

Use 3x3 the same panmagic 7x7 square (as first grid) to construct a panmagic 21x21 and 7x7 compact square.

Construct the first row of the second grid:

The sum of the numbers of each colour is 7

 1 1 1 1 2 2 2 2 2 2 2 1 1 0 0 0 0 0 0 0 1

The sum of the numbers of each colour is 3

 1 1 1 1 2 2 2 2 2 2 2 1 1 0 0 0 0 0 0 0 1

Construct row 2 up to 21 by shifting the first row each time 3 places to the left.

The third grid is a reflection (rotated by a quarter and mirrored) of the second grid.

Take 1x number from grid with 3x3 the same panmagic 7x7 square

 1 35 16 45 39 26 13 1 35 16 45 39 26 13 1 35 16 45 39 26 13 47 41 22 14 2 31 18 47 41 22 14 2 31 18 47 41 22 14 2 31 18 10 4 33 20 43 42 23 10 4 33 20 43 42 23 10 4 33 20 43 42 23 21 44 38 25 12 6 29 21 44 38 25 12 6 29 21 44 38 25 12 6 29 27 8 7 30 17 46 40 27 8 7 30 17 46 40 27 8 7 30 17 46 40 32 19 48 36 28 9 3 32 19 48 36 28 9 3 32 19 48 36 28 9 3 37 24 11 5 34 15 49 37 24 11 5 34 15 49 37 24 11 5 34 15 49 1 35 16 45 39 26 13 1 35 16 45 39 26 13 1 35 16 45 39 26 13 47 41 22 14 2 31 18 47 41 22 14 2 31 18 47 41 22 14 2 31 18 10 4 33 20 43 42 23 10 4 33 20 43 42 23 10 4 33 20 43 42 23 21 44 38 25 12 6 29 21 44 38 25 12 6 29 21 44 38 25 12 6 29 27 8 7 30 17 46 40 27 8 7 30 17 46 40 27 8 7 30 17 46 40 32 19 48 36 28 9 3 32 19 48 36 28 9 3 32 19 48 36 28 9 3 37 24 11 5 34 15 49 37 24 11 5 34 15 49 37 24 11 5 34 15 49 1 35 16 45 39 26 13 1 35 16 45 39 26 13 1 35 16 45 39 26 13 47 41 22 14 2 31 18 47 41 22 14 2 31 18 47 41 22 14 2 31 18 10 4 33 20 43 42 23 10 4 33 20 43 42 23 10 4 33 20 43 42 23 21 44 38 25 12 6 29 21 44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 2 2 2 1 1 0 0 0 0 0

+ 147x number from third grid (= reflection of second grid)

 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 2 2 2 0 0 0 1 2 2 2 0 0 0 1 2 2 2 0 0 0 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 2 2 2 0 0 0 1 2 2 2 0 0 0 1 2 2 2 0 0 0 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 0 0 0 1 2 2 2 0 0 0 1 2 2 2 0 0 0 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 0 0 0 1 2 2 2 0 0 0 1 2 2 2 0 0 0 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 0 0 0 1 2 2 2 0 0 0 1 2 2 2 0 0 0 1 2 2 2 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 2 2 2 0 0 0 1 2 2 2 0 0 0 1 2 2 2 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 2 2 2 0 0 0 1 2 2 2 0 0 0 1 2 2 2 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0 1 1 2 2 1 0 0

= 21x21 panmagic (and 7x7 compact) square

 197 231 359 388 284 124 111 246 280 408 437 235 75 13 148 182 310 339 186 26 62 243 433 414 406 100 129 116 292 384 365 308 2 31 18 194 335 316 357 51 80 67 255 396 425 265 141 91 219 157 298 327 167 43 42 170 206 347 376 216 92 140 268 266 436 381 221 12 6 176 168 338 332 172 61 55 225 217 387 430 270 110 104 274 370 302 301 30 17 46 187 321 351 350 79 66 95 285 419 400 399 128 115 144 236 326 313 195 36 28 205 199 375 362 244 134 126 254 248 424 411 293 85 77 156 150 331 318 207 54 83 211 245 429 416 256 103 132 260 294 380 367 158 5 34 162 196 344 378 65 94 137 271 405 393 427 114 143 88 222 307 295 329 16 45 39 173 356 390 286 120 112 247 276 410 439 237 71 14 149 178 312 341 188 22 63 198 227 361 402 249 131 118 288 238 366 304 151 33 20 190 189 317 353 200 82 69 239 287 415 413 142 87 74 159 300 323 315 44 38 25 208 349 372 364 93 136 123 257 398 421 223 8 7 177 164 340 334 174 57 56 226 213 389 432 272 106 105 275 262 438 383 179 19 48 183 175 352 346 228 68 97 281 273 401 395 277 117 146 232 224 303 297 37 24 60 201 377 358 392 135 122 109 250 426 407 441 86 73 11 152 328 309 343 50 84 212 241 431 418 258 99 133 261 290 382 369 160 1 35 163 192 333 320 209 96 139 267 259 394 423 263 145 90 218 161 296 325 165 47 41 169 210 345 374 214 108 102 278 412 435 385 72 10 4 180 314 337 336 23 59 53 229 363 386 434 121 119 289 234 368 306 153 29 21 191 185 319 355 202 78 70 240 283 417 404 251 127 76 155 154 324 311 193 40 27 204 203 373 360 242 138 125 253 252 422 409 291 89 32 166 342 330 322 58 52 81 215 391 428 420 107 101 130 264 440 379 371 9 3 184 171 354 348 230 64 98 282 269 403 397 279 113 147 233 220 305 299 181 15 49

21x21, Panmagic and 7x7 compact.xls