Prime Time

1/29[b=2] = 0·0000100011010011110111001011… (l=28)
1/29[b=3] = 0·0002210102011122200121202111… (l=28)
1/29[b=5] = 0·00412334403211… (l=14)
1/29[b=7] = 0·0145536… (l=7)
1/29[b=11] = 0·04199534608387[10]69115764[10]2723… (l=28)
1/29[b=13] = 0·05[10]9[11]28[12]7231[10]4… (l=14)
1/29[b=17] = 0·09[16]7… (l=4)
1/29[b=19] = 0·0[12]89[15][13][14]7[16]73[17][13]1[18]6[10]9354[11]2[11][15]15[17]… (l=28)
1/29[b=23] = 0·0[18]5[12][15][19][19]… (l=7)
1/29[b=29] = 0·1 (l=1)
1/29[b=31] = 0·1248[17]36[12][25][20]9[19]7[14][29][28][26][22][13][27][24][18]5[10][21][11][23][16]… (l=28)
1/29[b=37] = 0·1[10]7[24]8[34][16][21][25][19]53[30][22][35][26][29][12][28]2[20][15][11][17][31][33]6[14]… (l=28)
1/29[b=41] = 0·1[16][39][24]… (l=4)
1/29[b=43] = 0·1[20][32][26][29][28]7[17][34]4[19][11][37]2[41][22][10][16][13][14][35][25]8[38][23][31]5[40]… (l=28)
1/29[b=47] = 0·1[29]84[40][24][14][27][25][43][35][30][37][12][45][17][38][42]6[22][32][19][21]3[11][16]9[34]… (l=28)
1/29[b=53] = 0·1[43][45][36][29][12][42]… (l=7)
1/29[b=59] = 0·2… (l=1)
1/29[b=61] = 0·26[18][56][48][23]8[25][14][44][10][31][33][39][58][54][42]4[12][37][52][35][46][16][50][29][27][21]… (l=28)
1/29[b=67] = 0·2[20][53]9[16][11][36][64][46][13][57][50][55][30]… (l=14)
1/29[b=71] = 0·2[31][58][53][61][14][48][68][39][12][17]9[56][22]… (l=14)
1/29[b=73] = 0·2[37][55][27][50][25][12][42][57][65][32][52][62][67][70][35][17][45][22][47][60][30][15]7[40][20][10]5… (l=28)
1/29[b=79] = 0·2[57][16][27][19]5[35][32][54][38][10][70][65][29][76][21][62][51][59][73][43][46][24][40][68]8[13][49]… (l=28)
1/29[b=83] = 0·2[71][45][65][68][57][20]… (l=7)
1/29[b=89] = 0·36[12][24][49]9[18][36][73][58][27][55][21][42][85][82][76][64][39][79][70][52][15][30][61][33][67][46]… (l=28)
1/29[b=97] = 0·3[33][43][46][80][26][73][56][83][60][20]6[66][86][93][63][53][50][16][70][23][40][13][36][76][90][30][10]… (l=28)

More Narcissisum

The number 23 is special, inter alia, because it’s prime, divisible by only itself and 1. It’s also special because its reciprocal has maximum period. That is, the digits of 1/23 come in repeated blocks of 22, like this:

1/23 = 0·0434782608695652173913  0434782608695652173913  0434782608695652173913…

But 1/23 fails to be special in another way: you can’t sum its digits and get 23:

0 + 4 + 3 + 4 + 7 = 18
0 + 4 + 3 + 4 + 7 + 8 = 26
0 + 4 + 3 + 4 + 7 + 8 + 2 + 6 + 0 + 8 + 6 + 9 + 5 + 6 + 5 + 2 + 1 + 7 + 3 + 9 + 1 + 3 = 99

1/7 is different:

1/7 = 0·142857… → 1 + 4 + 2 = 7

This means that 7 is narcissistic: it reflects itself by manipulation of the digits of 1/7. But that’s in base ten. If you try base eight, 23 becomes narcissistic too (note that 23 = 2 x 8 + 7, so 23 in base eight is 27):

1/27 = 0·02620544131… → 0 + 2 + 6 + 2 + 0 + 5 + 4 + 4 = 27 (base=8)

Here are more narcissistic reciprocals in base ten:

1/3 = 0·3… → 3 = 3
1/7 = 0·142857… → 1 + 4 + 2 = 7
1/8 = 0·125 → 1 + 2 + 5 = 8
1/13 = 0·076923… → 0 + 7 + 6 = 13
1/14 = 0·0714285… → 0 + 7 + 1 + 4 + 2 = 14
1/34 = 0·02941176470588235… → 0 + 2 + 9 + 4 + 1 + 1 + 7 + 6 + 4 = 34
1/43 = 0·023255813953488372093… → 0 + 2 + 3 + 2 + 5 + 5 + 8 + 1 + 3 + 9 + 5 = 43
1/49 = 0·020408163265306122448979591836734693877551… → 0 + 2 + 0 + 4 + 0 + 8 + 1 + 6 + 3 + 2 + 6 + 5 + 3 + 0 + 6 + 1 + 2 = 49
1/51 = 0·0196078431372549… → 0 + 1 + 9 + 6 + 0 + 7 + 8 + 4 + 3 + 1 + 3 + 7 + 2 = 51
1/76 = 0·01315789473684210526… → 0 + 1 + 3 + 1 + 5 + 7 + 8 + 9 + 4 + 7 + 3 + 6 + 8 + 4 + 2 + 1 + 0 + 5 + 2 = 76
1/83 = 0·01204819277108433734939759036144578313253… → 0 + 1 + 2 + 0 + 4 + 8 + 1 + 9 + 2 + 7 + 7 + 1 + 0 + 8 + 4 + 3 + 3 + 7 + 3 + 4 + 9 = 83
1/92 = 0·010869565217391304347826… → 0 + 1 + 0 + 8 + 6 + 9 + 5 + 6 + 5 + 2 + 1 + 7 + 3 + 9 + 1 + 3 + 0 + 4 + 3 + 4 + 7 + 8 = 92
1/94 = 0·01063829787234042553191489361702127659574468085… → 0 + 1 + 0 + 6 + 3 + 8 + 2 + 9 + 7 + 8 + 7 + 2 + 3 + 4 + 0 + 4 + 2 + 5 + 5 + 3 + 1 + 9 + 1 + 4 = 94
1/98 = 0·0102040816326530612244897959183673469387755… → 0 + 1 + 0 + 2 + 0 + 4 + 0 + 8 + 1 + 6 + 3 + 2 + 6 + 5 + 3 + 0 + 6 + 1 + 2 + 2 + 4 + 4 + 8 + 9 + 7 + 9 + 5 = 98


Previously pre-posted (please peruse):

Digital Disfunction
The Hill to Power
Narcissarithmetic #1
Narcissarithmetic #2

Digital Disfunction

It’s fun when functions disfunc. The function digit-sum(n^p) takes a number, raises it to the power of p and sums its digits. If p = 1, n is unchanged. So digit-sum(1^1) = 1, digit-sum(11^1) = 2, digit-sum(2013^1) = 6. The following numbers set records for the digit-sum(n^1) from 1 to 1,000,000:

digit-sum(n^1): 1, 2, 3, 4, 5, 6, 7, 8, 9, 19, 29, 39, 49, 59, 69, 79, 89, 99, 199, 299, 399, 499, 599, 699, 799, 899, 999, 1999, 2999, 3999, 4999, 5999, 6999, 7999, 8999, 9999, 19999, 29999, 39999, 49999, 59999, 69999, 79999, 89999, 99999, 199999, 299999, 399999, 499999, 599999, 699999, 799999, 899999, 999999.

The pattern is easy to predict. But the function disfuncs when p = 2. Digit-sum(3^2) = 9, which is more than digit-sum(4^2) = 1 + 6 = 7 and digit-sum(5^2) = 2 + 5 = 7. These are the records from 1 to 1,000,000:

digit-sum(n^2): 1, 2, 3, 7, 13, 17, 43, 63, 83, 167, 264, 313, 707, 836, 1667, 2236, 3114, 4472, 6833, 8167, 8937, 16667, 21886, 29614, 32617, 37387, 39417, 42391, 44417, 60663, 63228, 89437, 141063, 221333, 659386, 791833, 976063, 987917.

Higher powers are similarly disfunctional:

digit-sum(n^3): 1, 2, 3, 4, 9, 13, 19, 53, 66, 76, 92, 132, 157, 353, 423, 559, 842, 927, 1192, 1966, 4289, 5826, 8782, 10092, 10192, 10275, 10285, 10593, 11548, 11595, 12383, 15599, 22893, 31679, 31862, 32129, 63927, 306842, 308113.

digit-sum(n^4): 1, 2, 3, 4, 6, 8, 13, 16, 18, 23, 26, 47, 66, 74, 118, 256, 268, 292, 308, 518, 659, 1434, 1558, 1768, 2104, 2868, 5396, 5722, 5759, 6381, 10106, 12406, 14482, 18792, 32536, 32776, 37781, 37842, 47042, 51376, 52536, 84632, 255948, 341156, 362358, 540518, 582477.

digit-sum(n^5): 1, 2, 3, 5, 6, 14, 15, 18, 37, 58, 78, 93, 118, 131, 139, 156, 179, 345, 368, 549, 756, 1355, 1379, 2139, 2759, 2779, 3965, 4119, 4189, 4476, 4956, 7348, 7989, 8769, 9746, 10566, 19199, 19799, 24748, 31696, 33208, 51856, 207198, 235846, 252699, 266989, 549248, 602555, 809097, 814308, 897778.

You can also look for narcissistic numbers with this function, like digit-sum(9^2) = 8 + 1 = 9 and digit-sum(8^3) = 5 + 1 + 2 = 8. 9^2 is the only narcissistic square in base ten, but 8^3 has these companions:

17^3 = 4913 → 4 + 9 + 1 + 3 = 17
18^3 = 5832 → 5 + 8 + 3 + 2 = 18
26^3 = 17576 → 1 + 7 + 5 + 7 + 6 = 26
27^3 = 19683 → 1 + 9 + 6 + 8 + 3 = 27

Twelfth powers are as unproductive as squares:

108^12 = 2518170116818978404827136 → 2 + 5 + 1 + 8 + 1 + 7 + 0 + 1 + 1 + 6 + 8 + 1 + 8 + 9 + 7 + 8 + 4 + 0 + 4 + 8 + 2 + 7 + 1 + 3 + 6 = 108

But thirteenth powers are fertile:

20 = digit-sum(20^13)
40 = digit-sum(40^13)
86 = digit-sum(86^13)
103 = digit-sum(103^13)
104 = digit-sum(104^13)
106 = digit-sum(106^13)
107 = digit-sum(107^13)
126 = digit-sum(126^13)
134 = digit-sum(134^13)
135 = digit-sum(135^13)
146 = digit-sum(146^13)

There are also numbers that are narcissistic with different powers, like 90:

90^19 = 1·350851717672992089 x 10^37 → 1 + 3 + 5 + 0 + 8 + 5 + 1 + 7 + 1 + 7 + 6 + 7 + 2 + 9 + 9 + 2 + 0 + 8 + 9 = 90
90^20 = 1·2157665459056928801 x 10^39 → 1 + 2 + 1 + 5 + 7 + 6 + 6 + 5 + 4 + 5 + 9 + 0 + 5 + 6 + 9 + 2 + 8 + 8 + 0 + 1 = 90
90^21 = 1·09418989131512359209 x 10^41 → 1 + 0 + 9 + 4 + 1 + 8 + 9 + 8 + 9 + 1 + 3 + 1 + 5 + 1 + 2 + 3 + 5 + 9 + 2 + 0 + 9 = 90
90^22 = 9·84770902183611232881 x 10^42 → 9 + 8 + 4 + 7 + 7 + 0 + 9 + 0 + 2 + 1 + 8 + 3 + 6 + 1 + 1 + 2 + 3 + 2 + 8 + 8 + 1 = 90
90^28 = 5·23347633027360537213511521 x 10^54 → 5 + 2 + 3 + 3 + 4 + 7 + 6 + 3 + 3 + 0 + 2 + 7 + 3 + 6 + 0 + 5 + 3 + 7 + 2 + 1 + 3 + 5 + 1 + 1 + 5 + 2 + 1 = 90

One of the world’s most famous numbers is also multi-narcissistic:

666 = digit-sum(666^47)
666 = digit-sum(666^51)

1423 isn’t multi-narcissistic, but I like the way it’s a prime that’s equal to the sum of the digits of its power to 101, which is also a prime:

1423^101 = 2,
976,424,759,070,864,888,448,625,568,610,774,713,351,233,339,
006,775,775,271,720,934,730,013,444,193,709,672,452,482,197,
898,160,621,507,330,824,007,863,598,230,100,270,989,373,401,
979,514,790,363,102,835,678,646,537,123,754,219,728,748,171,
764,802,617,086,504,534,229,621,770,717,299,909,463,416,760,
781,260,028,964,295,036,668,773,707,186,491,056,375,768,526,
306,341,717,666,810,190,220,650,285,746,057,099,312,179,689,
423 →

2 + 9 + 7 + 6 + 4 + 2 + 4 + 7 + 5 + 9 + 0 + 7 + 0 + 8 + 6 + 4 + 8 + 8 + 8 + 4 + 4 + 8 + 6 + 2 + 5 + 5 + 6 + 8 + 6 + 1 + 0 + 7 + 7 + 4 + 7 + 1 + 3 + 3 + 5 + 1 + 2 + 3 + 3 + 3 + 3 + 9 + 0 + 0 + 6 + 7 + 7 + 5 + 7 + 7 + 5 + 2 + 7 + 1 + 7 + 2 + 0 + 9 + 3 + 4 + 7 + 3 + 0 + 0 + 1 + 3 + 4 + 4 + 4 + 1 + 9 + 3 + 7 + 0 + 9 + 6 + 7 + 2 + 4 + 5 + 2 + 4 + 8 + 2 + 1 + 9 + 7 + 8 + 9 + 8 + 1 + 6 + 0 + 6 + 2 + 1 + 5 + 0 + 7 + 3 + 3 + 0 + 8 + 2 + 4 + 0 + 0 + 7 + 8 + 6 + 3 + 5 + 9 + 8 + 2 + 3 + 0 + 1 + 0 + 0 + 2 + 7 + 0 + 9 + 8 + 9 + 3 + 7 + 3 + 4 + 0 + 1 + 9 + 7 + 9 + 5 + 1 + 4 + 7 + 9 + 0 + 3 + 6 + 3 + 1 + 0 + 2 + 8 + 3 + 5 + 6 + 7 + 8 + 6 + 4 + 6 + 5 + 3 + 7 + 1 + 2 + 3 + 7 + 5 + 4 + 2 + 1 + 9 + 7 + 2 + 8 + 7 + 4 + 8 + 1 + 7 + 1 + 7 + 6 + 4 + 8 + 0 + 2 + 6 + 1 + 7 + 0 + 8 + 6 + 5 + 0 + 4 + 5 + 3 + 4 + 2 + 2 + 9 + 6 + 2 + 1 + 7 + 7 + 0 + 7 + 1 + 7 + 2 + 9 + 9 + 9 + 0 + 9 + 4 + 6 + 3 + 4 + 1 + 6 + 7 + 6 + 0 + 7 + 8 + 1 + 2 + 6 + 0 + 0 + 2 + 8 + 9 + 6 + 4 + 2 + 9 + 5 + 0 + 3 + 6 + 6 + 6 + 8 + 7 + 7 + 3 + 7 + 0 + 7 + 1 + 8 + 6 + 4 + 9 + 1 + 0 + 5 + 6 + 3 + 7 + 5 + 7 + 6 + 8 + 5 + 2 + 6 + 3 + 0 + 6 + 3 + 4 + 1 + 7 + 1 + 7 + 6 + 6 + 6 + 8 + 1 + 0 + 1 + 9 + 0 + 2 + 2 + 0 + 6 + 5 + 0 + 2 + 8 + 5 + 7 + 4 + 6 + 0 + 5 + 7 + 0 + 9 + 9 + 3 + 1 + 2 + 1 + 7 + 9 + 6 + 8 + 9 + 4 + 2 + 3 = 1423


Previously pre-posted (please peruse):

The Hill to Power
Narcissarithmetic #1
Narcissarithmetic #2

In Perms Of

13 is a prime number, divisible only by itself and 1. Perm 13 and you get 31, which is also a prime number. The same is true of 17, 37 and 79. There are only two possible permutations – 2 x 1 – of a two-digit number, so base-10 is terminally permal for two-digit primes:

13, 31
17, 71
37, 73
79, 97

What about three-digit primes? Now there are six possible permutations: 3 x 2 x 1. But base-10 is not terminally permal for three-digit primes. This is the best it does:

149, 419, 491, 941
179, 197, 719, 971
379, 397, 739, 937

Fortunately, we aren’t restricted to base-10. Take a step up and you’ll find that base-11 is terminally permal for three-digit primes (139 in base-11 = 1 x 11^2 + 3 x 11 + 9 = 163 in base-10):

139, 193, 319, 391, 913, 931 (6 primes) (base=11)

163, 223, 383, 463, 1103, 1123 (base=10)

Four-digit primes have twenty-four possible permutations – 4 x 3 x 2 x 1 – and base-10 again falls short:

1237, 1327, 1723, 2137, 2371, 
2713, 2731, 3217, 3271, 7213,
7321 (11 primes)

1279, 1297, 2179, 2719, 2791,
2917, 2971, 7129, 7219, 9127,
9721

For four-digit primes, the most permal base I’ve discovered so far is base-13 (where B represents [11]):

134B, 13B4, 14B3, 1B34, 1B43,
314B, 31B4, 34B1, 3B14, 413B,
41B3, 431B, 43B1, 4B13, 4B31,
B134, B143, B314, B413 (19 primes) (base=13)

2767, 2851, 3019, 4099, 4111,
6823, 6907, 7411, 8467, 9007,
9103, 9319, 9439, 10663, 10687,
24379, 24391, 24691, 24859 (base=10)

Is there a base in which all permutations of some four-digit number are prime? I think so, but I haven’t found it yet. Is there always some base, b, in which all permutations of some d-digit number are prime? Is there an infinity of bases in which all permutations of some d-digit number are prime? Easy to ask, difficult to answer. For me, anyway.

Factory Records

The factors of n are those numbers that divide n without remainder. So the factors of 6 are 1, 2, 3 and 6. If the function s(n) is defined as “the sum of the factors of n, excluding n, then s(6) = 1 + 2 + 3 = 6. This makes 6 a perfect number: its factors re-create it. 28 is another perfect number. The factors of 28 are 1, 2, 4, 7, 14 and 28, so s(28) = 1 + 2 + 4 + 7 + 14 = 28. Other perfect numbers are 496 and 8128. And they’re perfect in any base.

Amicable numbers are amicable in any base too. The factors of an amicable number sum to a second number whose factors sum to the first number. So s(220) = 284, s(284) = 220. That pair may have been known to Pythagoras (c.570-c.495 BC), but s(1184) = 1210, s(1210) = 1184 was discovered by an Italian schoolboy called Nicolò Paganini in 1866. There are also sociable chains, in which s(n), s(s(n)), s(s(s(n))) create a chain of numbers that leads back to n, like this:

12496 → 14288 → 15472 → 14536 → 14264 → 12496 (c=5)

Or this:

14316 → 19116 → 31704 → 47616 → 83328 → 177792 → 295488 → 629072 → 589786 → 294896 → 358336 → 418904 → 366556 → 274924 → 275444 → 243760 → 376736 → 381028 → 285778 → 152990 → 122410 → 97946 → 48976 → 45946 → 22976 → 22744 → 19916 → 17716 → 14316 (c=28)

Those sociable chains were discovered (and christened) in 1918 by the Belgian mathematician Paul Poulet (1887-1946). Other factor-sum patterns are dependant on the base they’re expressed in. For example, s(333) = 161. So both n and s(n) are palindromes in base-10. Here are more examples — the numbers in brackets are the prime factors of n and s(n):

333 (3^2, 37) → 161 (7, 23)
646 (2, 17, 19) → 434 (2, 7, 31)
656 (2^4, 41) → 646 (2, 17, 19)
979 (11, 89) → 101 (prime)
1001 (7, 11, 13) → 343 (7^3)
3553 (11, 17, 19) → 767 (13, 59)
10801 (7, 1543) → 1551 (3, 11, 47)
11111 (41, 271) → 313 (prime)
18581 (17, 1093) → 1111 (11, 101)
31713 (3, 11, 31^2) → 15951 (3, 13, 409)
34943 (83, 421) → 505 (5, 101)
48484 (2^2, 17, 23, 31) → 48284 (2^2, 12071)
57375 (3^3, 5^3, 17) → 54945 (3^3, 5, 11, 37)
95259 (3, 113, 281) → 33333 (3, 41, 271)
99099 (3^2, 7, 11^2, 13) → 94549 (7, 13, 1039)
158851 (7, 11, 2063) → 39293 (prime)
262262 (2, 7, 11, 13, 131) → 269962 (2, 7, 11, 1753)
569965 (5, 11, 43, 241) → 196691 (11, 17881)
1173711 (3, 7, 11, 5081) → 777777 (3, 7^2, 11, 13, 37)

Note how s(656) = 646 and s(646) = 434. There’s an even longer sequence in base-495:

33 → 55 → 77 → 99 → [17][17] → [19][19] → [21][21] → [43][43] → [45][45] → [111][111] → [193][193] → [195][195] → [477][477] (b=495) (c=13)
1488 (2^4, 3, 31) → 2480 (2^4, 5, 31) → 3472 (2^4, 7, 31) → 4464 (2^4, 3^2, 31) → 8432 (2^4, 17, 31) → 9424 (2^4, 19, 31) → 10416 (2^4, 3, 7, 31) → 21328 (2^4, 31, 43) → 22320 (2^4, 3^2, 5, 31) → 55056 (2^4, 3, 31, 37) → 95728 (2^4, 31, 193) → 96720 (2^4, 3, 5, 13, 31) → 236592 (2^4, 3^2, 31, 53)

I also tried looking for n whose s(n) mirrors n. But they’re hard to find in base-10. The first example is this:

498906 (2, 3^3, 9239) → 609894 (2, 3^2, 31, 1093)

498906 mirrors 609894, because the digits of each run in reverse to the digits of the other. Base-9 does better for mirror-sums, clocking up four in the same range of integers:

42 → 24 (base=9)
38 (2, 19) → 22 (2, 11)
402 → 204 (base=9)
326 (2, 163) → 166 (2, 83)
4002 → 2004 (base=9)
2918 (2, 1459) → 1462 (2, 17, 43)
5544 → 4455 (base=9)
4090 (2, 5, 409) → 3290 (2, 5, 7, 47)

Base-11 does better still, clocking up eight in the same range:

42 → 24 (base=11)
46 (2, 23) → 26 (2, 13)
2927 → 7292 (base=11)
3780 (2^2, 3^3, 5, 7) → 9660 (2^2, 3, 5, 7, 23)
4002 → 2004 (base=11)
5326 (2, 2663) → 2666 (2, 31, 43)
13772 → 27731 (base=11)
19560 (2^3, 3, 5, 163) → 39480 (2^3, 3, 5, 7, 47)
4[10]7[10]9 → 9[10]7[10]4 (base=11)
72840 (2^3, 3, 5, 607) → 146040 (2^3, 3, 5, 1217)
6929[10] → [10]9296 (base=11)
100176 (2^4, 3, 2087) → 158736 (2^4, 3, 3307)
171623 → 326171 (base=11)
265620 (2^2, 3, 5, 19, 233) → 520620 (2^2, 3, 5, 8677)
263702 → 207362 (base=11)
414790 (2, 5, 41479) → 331850 (2, 5^2, 6637)

Note that 42 mirrors its factor-sum in both base-9 and base-11. But s(42) = 24 in infinitely many bases, because when 42 = 2 x prime, s(42) = 1 + 2 + prime. So (prime-1) / 2 will give the base in which 24 = s(42). For example, 2 x 11 = 22 and 22 = 42 in base (11-1) / 2 or base-5. So s(42) = 1 + 2 + 11 = 14 = 2 x 5 + 4 = 24[b=5]. There are infinitely many primes, so infinitely many bases in which s(42) = 24.

Base-10 does better for mirror-sums when s(n) is re-defined to include n itself. So s(69) = 1 + 3 + 23 + 69 = 96. Here are the first examples of all-factor mirror-sums in base-10:

69 (3, 23) → 96 (2^5, 3)
276 (2^2, 3, 23) → 672 (2^5, 3, 7)
639 (3^2, 71) → 936 (2^3, 3^2, 13)
2556 (2^2, 3^2, 71) → 6552 (2^3, 3^2, 7, 13)

In the same range, base-9 now produces one mirror-sum, 13 → 31 = 12 (2^2, 3) → 28 (2^2, 7). Base-11 produces no mirror-sums in the same range. Base behaviour is eccentric, but that’s what makes it interesting.

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

Roo’s Who

11 is a prime number, divisible by only itself and 1. If you add its digits, 1 + 1, you get 2. 11 + 2 = 13, another prime number. And 13 + (1 + 3) = 17, a third prime number. And there it ends, because 17 + (1 + 7) = 25 = 5 x 5. I call (11, 13, 17) kangaroo primes, because one jumps to another. In base 10, the record for numbers below 1,000,000 is this:

6 primes: 516493 + 28 = 516521 + 20 = 516541 + 22 = 516563 + 26 = 516589 + 34 = 516623.

In base 16, the record is this:

8 primes: 97397 = 17,C75[b=16] + 32 = 97429 = 17,C95[b=16] + 34 = 97463 = 17,CB7[b=16] + 38 = 97501 = 17,CDD[b=16] + 46 = 97547 = 17,D0B[b=16] + 32 = 97579 = 17,D2B[b=16] + 34 = 97613 = 17,D4D[b=16] + 38 = 97651 = 17,D73[b=16].

Another kind of kangaroo prime is found not by adding the sum of digits, but by adding their product, i.e., the result of multiplying the digits (except 0). 23 + (2 x 3) = 29. 29 + (2 x 9) = 47. But 47 + (4 x 7) = 75 = 3 x 5 x 5. So (23, 29, 47) are kangaroo primes too. In base 10, the record for numbers below 1,000,000 is this:

9 primes: 524219 + 720 = 524939 + 9720 = 534659 + 16200 = 550859 + 9000 = 559859 + 81000 = 640859 + 8640 = 649499 + 69984 = 719483 + 6048 = 725531.

But what about subtraction? For a reason I don’t understand, subtracting the digit-sum doesn’t seem to create any kangaroo-primes in base 10. But 11 in base 8 is 13 = 1 x 8^1 + 3 x 8^0 and 13[b=8] – (1 + 3) = 7. In base 2, this sequence appears:

1619 = 11,001,010,011[b=2] – 6 = 1613 = 11,001,001,101[b=2] – 6 = 1607 = 11,001,000,111[b=2] – 6 = 1601 = 11,001,000,001[b=2] – 4 = 1597.

However, subtracting the digit-product creates kangaroo-primes in base 10. For example, 23 – (2 x 3) = 17. The record below 1,000,000 is this (when 0 is found in the digits of a number, it is not included in the multiplication):

7 primes: 64037 – 504 = 63533 – 810 = 62723 – 504 = 62219 – 216 = 62003 – 36 = 61967 – 2268 = 59699.

Base 2 also provides examples of addition/subtraction pairs of kangaroo-primes, like this:

3 = 11[b=2] + 2 = 5 = 101[b=2] | 5 = 101[b=2] – 2 = 3

277 = 100,010,101[b=2] + 4 = 281 = 100,011,001[b=2] | 281 – 4 = 277

311 = 100,110,111[b=2] + 6 = 317 = 100,111,101[b=2] | 317 – 6 = 311

In base 10, addition/subtraction pairs are created by the digit-product, like this:

239 + 54 = 293 | 293 – 54 = 239
563 + 90 = 653 | 653 – 90 = 563
613 + 18 = 631 | 631 – 18 = 613
2791 + 126 = 2917 | 2917 – 126 = 2791
3259 + 270 = 3529 | 3529 – 270 = 3259
5233 + 90 = 5323 | 5323 – 90 = 5233
5297 + 630 = 5927 | 5927 – 630 = 5297
6113 + 18 = 6131 | 6131 – 18 = 6113
10613 + 18 = 10631 | 10631 – 18 = 10613
12791 + 126 = 12917 | 12917 – 126 = 12791

You could call these boxing primes, like boxing kangaroos. The two primes in the pair usually have the same digits in different arrangements, but there are also pairs like these:

24527 + 560 = 25087 | 25087 – 560 = 24527
25183 + 240 = 25423 | 25423 – 240 = 25183
50849 + 1440 = 52289 | 52289 – 1440 = 50849

Keeping It Gweel

Gweel & Other Alterities, Simon Whitechapel (Ideophasis Press, 2011)

This review is a useless waste of time. I can tell you very little about Gweel. It’s a book, if that helps. It’s made of paper. It has pages. Lots of little words on the pages.

What I can’t do is classify Gweel into a genre, not because none of them fit, but because the concept of a genre doesn’t seem to apply to Gweel. It stands alone, without classification. Calling Gweel “experimental” or “avant garde” would be like stamping a barcode on a moon rock.

It may have been written for an audience of one: author Simon Whitechapel. If we make the very reasonable assumption that he owns a copy of his own book, he may have attained 100% market saturation. However, there could be a valuable peripheral market: people who want to read a book that is very different from anything they’ve read before.

It is a collection of short pieces of writing, similar in tone but not in form, exploring “dread, death, and doom.” “Kopfwurmkundalini” and “Beating the Meat” resemble horror stories, and manage to be frightening yet strangely fantastic. The first one is about a man – paralysed in a motorbike accident, able to communicate only by eye-blinks – and his induction into a strange new reality. It contains a rather thrilling story-within-a-story called “MS Found in a Steel Bottle”, about two men journeying to the bottom of the ocean in a bathysphere. “Kopfwurmkundalini”’s final pages are written in a made-up language, but the author has encluded a glossary so that you can finish the story.

Those two/three stories make up about half of Gweel’s length. The remainder mostly consists of shorter work that seems to be more about creating an atmosphere or evoking an emotion. “Night Shift” is about a prison for planets (Venus, we learn, is serving a 10^3.2 year sentence for sex-trafficking), and a theme of prisons and planets runs through a fair few of the other stories here, although usually in a less surreal context. “Acariasis” is a vignette about a convict who sees a dust-mite crawling on his cell wall, and imagines it’s a grain of sand from Mars. The image is vivid and the piece has a powerful effect. “Primessence” is The Shawshank Redemption on peyote (and math). A prisoner believes that because his cell is a prime number, he will soon be snatched from it by some mathematical daemon (the story ends with the prisoner’s fate unknown). “The Whisper” is a ghost story of sorts, short and achingly sad.

No doubt my impression of Gweel differs from the one the author intended. But maybe his intention was that I have that different impression than him. Maybe Gweel reveals different secrets to each reader.

I can’t analyse it much, but Gweel struck me as an experience like Fellini’s Amarcord… lots of little story-threads, none of them terribly meaningful on their own. Experienced together, however, those threads will weave themselves into a tapestry in the hall of your mind, a tapestry that’s entirely unique… and your own.

Original review


Jesús say: I… S….. R… U… B… B… I… S…. H…. B… O… O… K…. | W… H… A…. N… K… C…. H… A… P… L…. E…. I… S…. H… I… J… O…. D… E…. P… U…. T… A…..

Previously pre-posted:

It’s The Gweel Thing…