More Multi-Magic

The answer, I’m glad to say, is yes. The question is: Can a prime magic-square nest inside a second prime magic-square that nests inside a third prime magic-square? I asked this in Multi-Magic, where I described how a magic square is a square of numbers where all rows, all columns and both diagonals add to the same number, or magic total. This magic square consists entirely of prime numbers, or numbers divisible only by themselves and 1:

43 | 01 | 67
61 | 37 | 13
07 | 73 | 31

Base = 10, magic total = 111

It nests inside this prime magic-square, whose digit-sums in base-97 re-create it:

0619  =  [06][37] | 0097  =  [01][00] | 1123  =  [11][56]
1117  =  [11][50] | 0613  =  [06][31] | 0109  =  [01][12]
0103  =  [01][06] | 1129  =  [11][62] | 0607  =  [06][25]

Base = 97, magic total = 1839

And that prime magic-square nests inside this one:

2803  =  [1][0618] | 2281  =  [1][0096] | 3307  =  [1][1122]
3301  =  [1][1116] | 2797  =  [1][0612] | 2293  =  [1][0108]
2287  =  [1][0102] | 3313  =  [1][1128] | 2791  =  [1][0606]

Base = 2185, magic total = 8391

I don’t know whether that prime magic-square nests inside a fourth square, but a 3-nest is good for 3×3 magic squares. On the other hand, this famous 3×3 magic square is easy to nest inside an infinite series of other magic squares:

6 | 1 | 8
7 | 5 | 3
2 | 9 | 4

Base = 10, magic total = 15

It’s created by the digit-sums of this square in base-9 (“14 = 15” means that the number 14 is represented as “15” in base-9):

14 = 15 → 6 | 09 = 10 → 1 | 16 = 17 → 8
15 = 16 → 7 | 13 = 14 → 5 | 11 = 12 → 3
10 = 11 → 2 | 17 = 18 → 9 | 12 = 13 → 4

Base = 9, magic total = 39


And that square in base-9 is created by the digit-sums of this square in base-17:

30 = 1[13] → 14 | 25 = 00018 → 09 | 32 = 1[15] → 16
31 = 1[14] → 15 | 29 = 1[12] → 13 | 27 = 1[10] → 11
26 = 00019 → 10 | 33 = 1[16] → 17 | 28 = 1[11] → 12

Base = 17, magic total = 87

And so on:

62 = 1[29] → 30 | 57 = 1[24] → 25 | 64 = 1[31] → 32
63 = 1[30] → 31 | 61 = 1[28] → 29 | 59 = 1[26] → 27
58 = 1[25] → 26 | 65 = 1[32] → 33 | 60 = 1[27] → 28

Base = 33, magic total = 183

126 = 1[61] → 62 | 121 = 1[56] → 57 | 128 = 1[63] → 64
127 = 1[62] → 63 | 125 = 1[60] → 61 | 123 = 1[58] → 59
122 = 1[57] → 58 | 129 = 1[64] → 65 | 124 = 1[59] → 60

Base = 65, magic total = 375

Previously Pre-Posted (please peruse):

Multi-Magic

Multi-Magic

A magic square is a square of numbers in which all rows, all columns and both diagonals add to the same number, or magic total. The simplest magic square using distinct numbers is this:

6 1 8
7 5 3
2 9 4

It’s easy to prove that the magic total of a 3×3 magic square must be three times the central number. Accordingly, if the central number is 37, the magic total must be 111. There are lots of ways to create a magic square with 37 at its heart, but this is my favourite:

43 | 01 | 67
61 | 37 | 13
07 | 73 | 31

The square is special because all the numbers are prime, or divisible by only themselves and 1 (though 1 itself is not usually defined as prime in modern mathematics). I like the 37-square even more now that I’ve discovered it can be found inside another all-prime magic square:

0619 = 0006[37] | 0097 = 00000010 | 1123 = [11][56]
1117 = [11][50] | 0613 = 0006[31] | 0109 = 0001[12]
0103 = 00000016 | 1129 = [11][62] | 0607 = 0006[25]

Magic total = 1839

The square is shown in both base-10 and base-97. If the digit-sums of the base-97 square are calculated, this is the result (e.g., the digit-sum of 6[37][b=97] = 6 + 37 = 43):

43 | 01 | 67
61 | 37 | 13
07 | 73 | 31

This makes me wonder whether the 613-square might nest in another all-prime square, and so on, perhaps ad infinitum [Update: yes, the 613-square is a nestling]. There are certainly many nested all-prime squares. Here is square-631 in base-187:

661 = 003[100] | 379 = 00000025 | 853 = 004[105]
823 = 004[075] | 631 = 003[070] | 439 = 002[065]
409 = 002[035] | 883 = 004[135] | 601 = 003[040]

Magic total = 1893

Digit-sums:

103 | 007 | 109
079 | 073 | 067
037 | 139 | 043

Magic total = 219

There are also all-prime magic squares that have two kinds of nestlings inside them: digit-sum magic squares and digit-product magic squares. The digit-product of a number is calculated by multiplying its digits (except 0): digit-product(37) = 3 x 7 = 21, digit-product(103) = 1 x 3 = 3, and so on. In base-331, this all-prime magic square yields both a digit-sum square and a digit-product square:

503 = 1[172] | 359 = 1[028] | 521 = 1[190]
479 = 1[148] | 461 = 1[130] | 443 = 1[112]
401 = 1[070] | 563 = 1[232] | 419 = 1[088]

Magic total = 1383

Digit-sums:

173 | 029 | 191
149 | 131 | 113
071 | 233 | 089

Magic total = 393

Digit-products:

172 | 028 | 190
148 | 130 | 112
070 | 232 | 088

Magic total = 390

Here are two more twin-bearing all-prime magic squares:

Square-719 in base-451:

761 = 1[310] | 557 = 1[106] | 839 = 1[388]
797 = 1[346] | 719 = 1[268] | 641 = 1[190]
599 = 1[148] | 881 = 1[430] | 677 = 1[226]

Magic total = 2157

Digit-sums:

311 | 107 | 389
347 | 269 | 191
149 | 431 | 227

Magic total = 807

Digit-products:

310 | 106 | 388
346 | 268 | 190
148 | 430 | 226

Magic total = 804

Square-853 in base-344:

883 = 2[195] | 709 = 2[021] | 967 = 2[279]
937 = 2[249] | 853 = 2[165] | 769 = 2[081]
739 = 2[051] | 997 = 2[309] | 823 = 2[135]

Magic total = 2559

Digit-sums:

197 | 023 | 281
251 | 167 | 083
053 | 311 | 137

Magic total = 501

Digit-products:

390 | 042 | 558
498 | 330 | 162
102 | 618 | 270

Magic total = 990

Proviously Post-Posted (please peruse):

More Multi-Magic

Prummer-Time Views

East, west, home’s best. And for human beings, base-10 is a kind of home. We have ten fingers and we use ten digits. Base-10 comes naturally to us: it feels like home. So it’s disappointing that there is no number in base-10 that is equal to the sum of the squares of its digits (apart from the trivial 0^2 = 0 and 1^2 = 1). Base-9 and base-11 do better:

41 = 45[b=9] = 4^2 + 5^2 = 16 + 25 = 41
50 = 55[b=9] = 5^2 + 5^2 = 25 + 25 = 50

61 = 56[b=11] = 5^2 + 6^2 = 25 + 36 = 61
72 = 66[b=11] = 6^2 + 6^2 = 36 + 36 = 72

Base-47 does better still, with fourteen 2-sumbers. And base-10 does have 3-sumbers, or numbers equal to the sum of the cubes of their digits:

153 = 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153
370 = 3^3 + 7^3 + 0^3 = 27 + 343 + 0 = 370
371 = 3^3 + 7^3 + 1^3 = 27 + 343 + 1 = 371
407 = 4^3 + 0^3 + 7^3 = 64 + 0 + 343 = 407

But base-10 disappoints again when it comes to prumbers, or prime sumbers, or numbers that are equal to the sum of the primes whose indices are equal to the digits of the number. The index of a prime number is its position in the list of primes. Here are the first nine primes and their indices (with 0 as a pseudo-prime at position 0):

prime(0) = 0
prime(1) = 2
prime(2) = 3
prime(3) = 5
prime(4) = 7
prime(5) = 11
prime(6) = 13
prime(7) = 17
prime(8) = 19
prime(9) = 23

So the prumber, or prime-sumber, of 1 = prime(1) = 2. The prumber of 104 = prime(1) + prime(0) + prime(4) = 2 + 0 + 7 = 9. The prumber of 186 = 2 + 19 + 13 = 34. But no number in base-10 is equal to its prime sumber. Base-2 and base-3 do better:

Base-2 has 1 prumber:

2 = 10[b=2] = 2 + 0 = 2

Base-3 has 2 prumbers:

4 = 11[b=3] = 2 + 2 = 4
5 = 12[b=3] = 2 + 3 = 5

But prumbers are rare. The next record is set by base-127, with 4 prumbers:

165 = 1[38][b=127] = 2 + 163 = 165
320 = 2[66][b=127] = 3 + 317 = 320
472 = 3[91][b=127] = 5 + 467 = 472
620 = 4[112][b=127] = 7 + 613 = 620

Base-479 has 4 prumbers:

1702 = 3[265] = 5 + 1697 = 1702
2250 = 4[334] = 7 + 2243 = 2250
2800 = 5[405] = 11 + 2789 = 2800
3344 = 6[470] = 13 + 3331 = 3344

Base-637 has 4 prumbers:

1514 = 2[240] = 3 + 1511 = 1514
2244 = 3[333] = 5 + 2239 = 2244
2976 = 4[428] = 7 + 2969 = 2976
4422 = 6[600] = 13 + 4409 = 4422

Base-831 has 4 prumbers:

999 = 1[168] = 2 + 997 = 999
2914 = 3[421] = 5 + 2909 = 2914
3858 = 4[534] = 7 + 3851 = 3858
4798 = 5[643] = 11 + 4787 = 4798

Base-876 has 4 prumbers:

1053 = 1[177] = 2 + 1051 = 1053
3066 = 3[438] = 5 + 3061 = 3066
4064 = 4[560] = 7 + 4057 = 4064
6042 = 6[786] = 13 + 6029 = 6042

Previously pre-posted (please peruse):

Sumbertime Views