You can transform a 16x16 square with consecutive numbers into a most perfect (Franklin pan) magic 16x16 square in the following 5 steps. Swap each time 'yellow' and 'red':
# | * | @ | ~ | ~ | @ | * | # | |||||||||
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | |
17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | |
33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | |
49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | |
65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | |
81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | |
97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | |
113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | |
129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | |
145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | |
161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | |
177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | |
193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | |
209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | |
225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | |
241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | |
1 | 2 | 16 | 15 | 5 | 6 | 12 | 11 | 9 | 10 | 8 | 7 | 13 | 14 | 4 | 3 | |
17 | 18 | 32 | 31 | 21 | 22 | 28 | 27 | 25 | 26 | 24 | 23 | 29 | 30 | 20 | 19 | |
# | 33 | 34 | 48 | 47 | 37 | 38 | 44 | 43 | 41 | 42 | 40 | 39 | 45 | 46 | 36 | 35 |
* | 49 | 50 | 64 | 63 | 53 | 54 | 60 | 59 | 57 | 58 | 56 | 55 | 61 | 62 | 52 | 51 |
65 | 66 | 80 | 79 | 69 | 70 | 76 | 75 | 73 | 74 | 72 | 71 | 77 | 78 | 68 | 67 | |
81 | 82 | 96 | 95 | 85 | 86 | 92 | 91 | 89 | 90 | 88 | 87 | 93 | 94 | 84 | 83 | |
@ | 97 | 98 | 112 | 111 | 101 | 102 | 108 | 107 | 105 | 106 | 104 | 103 | 109 | 110 | 100 | 99 |
~ | 113 | 114 | 128 | 127 | 117 | 118 | 124 | 123 | 121 | 122 | 120 | 119 | 125 | 126 | 116 | 115 |
129 | 130 | 144 | 143 | 133 | 134 | 140 | 139 | 137 | 138 | 136 | 135 | 141 | 142 | 132 | 131 | |
145 | 146 | 160 | 159 | 149 | 150 | 156 | 155 | 153 | 154 | 152 | 151 | 157 | 158 | 148 | 147 | |
~ | 161 | 162 | 176 | 175 | 165 | 166 | 172 | 171 | 169 | 170 | 168 | 167 | 173 | 174 | 164 | 163 |
@ | 177 | 178 | 192 | 191 | 181 | 182 | 188 | 187 | 185 | 186 | 184 | 183 | 189 | 190 | 180 | 179 |
193 | 194 | 208 | 207 | 197 | 198 | 204 | 203 | 201 | 202 | 200 | 199 | 205 | 206 | 196 | 195 | |
209 | 210 | 224 | 223 | 213 | 214 | 220 | 219 | 217 | 218 | 216 | 215 | 221 | 222 | 212 | 211 | |
* | 225 | 226 | 240 | 239 | 229 | 230 | 236 | 235 | 233 | 234 | 232 | 231 | 237 | 238 | 228 | 227 |
# | 241 | 242 | 256 | 255 | 245 | 246 | 252 | 251 | 249 | 250 | 248 | 247 | 253 | 254 | 244 | 243 |
1 | 2 | 16 | 15 | 5 | 6 | 12 | 11 | 9 | 10 | 8 | 7 | 13 | 14 | 4 | 3 | |
17 | 18 | 32 | 31 | 21 | 22 | 28 | 27 | 25 | 26 | 24 | 23 | 29 | 30 | 20 | 19 | |
241 | 242 | 256 | 255 | 245 | 246 | 252 | 251 | 249 | 250 | 248 | 247 | 253 | 254 | 244 | 243 | |
225 | 226 | 240 | 239 | 229 | 230 | 236 | 235 | 233 | 234 | 232 | 231 | 237 | 238 | 228 | 227 | |
65 | 66 | 80 | 79 | 69 | 70 | 76 | 75 | 73 | 74 | 72 | 71 | 77 | 78 | 68 | 67 | |
81 | 82 | 96 | 95 | 85 | 86 | 92 | 91 | 89 | 90 | 88 | 87 | 93 | 94 | 84 | 83 | |
177 | 178 | 192 | 191 | 181 | 182 | 188 | 187 | 185 | 186 | 184 | 183 | 189 | 190 | 180 | 179 | |
161 | 162 | 176 | 175 | 165 | 166 | 172 | 171 | 169 | 170 | 168 | 167 | 173 | 174 | 164 | 163 | |
129 | 130 | 144 | 143 | 133 | 134 | 140 | 139 | 137 | 138 | 136 | 135 | 141 | 142 | 132 | 131 | |
145 | 146 | 160 | 159 | 149 | 150 | 156 | 155 | 153 | 154 | 152 | 151 | 157 | 158 | 148 | 147 | |
113 | 114 | 128 | 127 | 117 | 118 | 124 | 123 | 121 | 122 | 120 | 119 | 125 | 126 | 116 | 115 | |
97 | 98 | 112 | 111 | 101 | 102 | 108 | 107 | 105 | 106 | 104 | 103 | 109 | 110 | 100 | 99 | |
193 | 194 | 208 | 207 | 197 | 198 | 204 | 203 | 201 | 202 | 200 | 199 | 205 | 206 | 196 | 195 | |
209 | 210 | 224 | 223 | 213 | 214 | 220 | 219 | 217 | 218 | 216 | 215 | 221 | 222 | 212 | 211 | |
49 | 50 | 64 | 63 | 53 | 54 | 60 | 59 | 57 | 58 | 56 | 55 | 61 | 62 | 52 | 51 | |
33 | 34 | 48 | 47 | 37 | 38 | 44 | 43 | 41 | 42 | 40 | 39 | 45 | 46 | 36 | 35 | |
1 | 242 | 16 | 255 | 5 | 246 | 12 | 251 | 9 | 250 | 8 | 247 | 13 | 254 | 4 | 243 | |
17 | 18 | 32 | 31 | 21 | 22 | 28 | 27 | 25 | 26 | 24 | 23 | 29 | 30 | 20 | 19 | |
241 | 2 | 256 | 15 | 245 | 6 | 252 | 11 | 249 | 10 | 248 | 7 | 253 | 14 | 244 | 3 | |
225 | 226 | 240 | 239 | 229 | 230 | 236 | 235 | 233 | 234 | 232 | 231 | 237 | 238 | 228 | 227 | |
65 | 178 | 80 | 191 | 69 | 182 | 76 | 187 | 73 | 186 | 72 | 183 | 77 | 190 | 68 | 179 | |
81 | 82 | 96 | 95 | 85 | 86 | 92 | 91 | 89 | 90 | 88 | 87 | 93 | 94 | 84 | 83 | |
177 | 66 | 192 | 79 | 181 | 70 | 188 | 75 | 185 | 74 | 184 | 71 | 189 | 78 | 180 | 67 | |
161 | 162 | 176 | 175 | 165 | 166 | 172 | 171 | 169 | 170 | 168 | 167 | 173 | 174 | 164 | 163 | |
129 | 114 | 144 | 127 | 133 | 118 | 140 | 123 | 137 | 122 | 136 | 119 | 141 | 126 | 132 | 115 | |
145 | 146 | 160 | 159 | 149 | 150 | 156 | 155 | 153 | 154 | 152 | 151 | 157 | 158 | 148 | 147 | |
113 | 130 | 128 | 143 | 117 | 134 | 124 | 139 | 121 | 138 | 120 | 135 | 125 | 142 | 116 | 131 | |
97 | 98 | 112 | 111 | 101 | 102 | 108 | 107 | 105 | 106 | 104 | 103 | 109 | 110 | 100 | 99 | |
193 | 50 | 208 | 63 | 197 | 54 | 204 | 59 | 201 | 58 | 200 | 55 | 205 | 62 | 196 | 51 | |
209 | 210 | 224 | 223 | 213 | 214 | 220 | 219 | 217 | 218 | 216 | 215 | 221 | 222 | 212 | 211 | |
49 | 194 | 64 | 207 | 53 | 198 | 60 | 203 | 57 | 202 | 56 | 199 | 61 | 206 | 52 | 195 | |
33 | 34 | 48 | 47 | 37 | 38 | 44 | 43 | 41 | 42 | 40 | 39 | 45 | 46 | 36 | 35 | |
1 | 242 | 16 | 255 | 5 | 246 | 12 | 251 | 9 | 250 | 8 | 247 | 13 | 254 | 4 | 243 | |
32 | 31 | 17 | 18 | 28 | 27 | 21 | 22 | 24 | 23 | 25 | 26 | 20 | 19 | 29 | 30 | |
241 | 2 | 256 | 15 | 245 | 6 | 252 | 11 | 249 | 10 | 248 | 7 | 253 | 14 | 244 | 3 | |
240 | 239 | 225 | 226 | 236 | 235 | 229 | 230 | 232 | 231 | 233 | 234 | 228 | 227 | 237 | 238 | |
65 | 178 | 80 | 191 | 69 | 182 | 76 | 187 | 73 | 186 | 72 | 183 | 77 | 190 | 68 | 179 | |
96 | 95 | 81 | 82 | 92 | 91 | 85 | 86 | 88 | 87 | 89 | 90 | 84 | 83 | 93 | 94 | |
177 | 66 | 192 | 79 | 181 | 70 | 188 | 75 | 185 | 74 | 184 | 71 | 189 | 78 | 180 | 67 | |
176 | 175 | 161 | 162 | 172 | 171 | 165 | 166 | 168 | 167 | 169 | 170 | 164 | 163 | 173 | 174 | |
129 | 114 | 144 | 127 | 133 | 118 | 140 | 123 | 137 | 122 | 136 | 119 | 141 | 126 | 132 | 115 | |
160 | 159 | 145 | 146 | 156 | 155 | 149 | 150 | 152 | 151 | 153 | 154 | 148 | 147 | 157 | 158 | |
113 | 130 | 128 | 143 | 117 | 134 | 124 | 139 | 121 | 138 | 120 | 135 | 125 | 142 | 116 | 131 | |
112 | 111 | 97 | 98 | 108 | 107 | 101 | 102 | 104 | 103 | 105 | 106 | 100 | 99 | 109 | 110 | |
193 | 50 | 208 | 63 | 197 | 54 | 204 | 59 | 201 | 58 | 200 | 55 | 205 | 62 | 196 | 51 | |
224 | 223 | 209 | 210 | 220 | 219 | 213 | 214 | 216 | 215 | 217 | 218 | 212 | 211 | 221 | 222 | |
49 | 194 | 64 | 207 | 53 | 198 | 60 | 203 | 57 | 202 | 56 | 199 | 61 | 206 | 52 | 195 | |
48 | 47 | 33 | 34 | 44 | 43 | 37 | 38 | 40 | 39 | 41 | 42 | 36 | 35 | 45 | 46 | |
1 | 242 | 16 | 255 | 5 | 246 | 12 | 251 | 9 | 250 | 8 | 247 | 13 | 254 | 4 | 243 | |
240 | 31 | 225 | 18 | 236 | 27 | 229 | 22 | 232 | 23 | 233 | 26 | 228 | 19 | 237 | 30 | |
241 | 2 | 256 | 15 | 245 | 6 | 252 | 11 | 249 | 10 | 248 | 7 | 253 | 14 | 244 | 3 | |
32 | 239 | 17 | 226 | 28 | 235 | 21 | 230 | 24 | 231 | 25 | 234 | 20 | 227 | 29 | 238 | |
65 | 178 | 80 | 191 | 69 | 182 | 76 | 187 | 73 | 186 | 72 | 183 | 77 | 190 | 68 | 179 | |
176 | 95 | 161 | 82 | 172 | 91 | 165 | 86 | 168 | 87 | 169 | 90 | 164 | 83 | 173 | 94 | |
177 | 66 | 192 | 79 | 181 | 70 | 188 | 75 | 185 | 74 | 184 | 71 | 189 | 78 | 180 | 67 | |
96 | 175 | 81 | 162 | 92 | 171 | 85 | 166 | 88 | 167 | 89 | 170 | 84 | 163 | 93 | 174 | |
129 | 114 | 144 | 127 | 133 | 118 | 140 | 123 | 137 | 122 | 136 | 119 | 141 | 126 | 132 | 115 | |
112 | 159 | 97 | 146 | 108 | 155 | 101 | 150 | 104 | 151 | 105 | 154 | 100 | 147 | 109 | 158 | |
113 | 130 | 128 | 143 | 117 | 134 | 124 | 139 | 121 | 138 | 120 | 135 | 125 | 142 | 116 | 131 | |
160 | 111 | 145 | 98 | 156 | 107 | 149 | 102 | 152 | 103 | 153 | 106 | 148 | 99 | 157 | 110 | |
193 | 50 | 208 | 63 | 197 | 54 | 204 | 59 | 201 | 58 | 200 | 55 | 205 | 62 | 196 | 51 | |
48 | 223 | 33 | 210 | 44 | 219 | 37 | 214 | 40 | 215 | 41 | 218 | 36 | 211 | 45 | 222 | |
49 | 194 | 64 | 207 | 53 | 198 | 60 | 203 | 57 | 202 | 56 | 199 | 61 | 206 | 52 | 195 | |
224 | 47 | 209 | 34 | 220 | 43 | 213 | 38 | 216 | 39 | 217 | 42 | 212 | 35 | 221 | 46 |
This 16x16 magic square is panmagic, 2x2 compact and each 1/4 row/column/diagonal gives 1/4 of the magic sum.
Use this method to construct magic squares of order is multiple of 4 from 4x4 to infinity. See 4x4, 8x8, 12x12, 16x16, 20x20, 24x24, 28x28, 32x32