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

Neuclid on the Block

How many blows does it take to demolish a wall with a hammer? It depends on the wall and the hammer, of course. If the wall is reality and the hammer is mathematics, you can do it in three blows, like this:

α’. Σημεῖόν ἐστιν, οὗ μέρος οὐθέν.
β’. Γραμμὴ δὲ μῆκος ἀπλατές.
γ’. Γραμμῆς δὲ πέρατα σημεῖα.

1. A point is that of which there is no part.
2. A line is a length without breadth.
3. The extremities of a line are points.

That is the astonishing, world-shattering opening in one of the strangest – and sanest – books ever written. It’s twenty-three centuries old, was written by an Alexandrian mathematician called Euclid (fl. 300 B.C.), and has been pored over by everyone from Abraham Lincoln to Bertrand Russell by way of Edna St. Vincent Millay. Its title is highly appropriate: Στοιχεῖα, or Elements. Physical reality is composed of chemical elements; mathematical reality is composed of logical elements. The second reality is much bigger – infinitely bigger, in fact. In his Elements, Euclid slipped the bonds of time, space and matter by demolishing the walls of reality with a mathematical hammer and escaping into a world of pure abstraction.

• Continue reading Neuclid on the Block

Spiral Archipelago

Incomplete map of Earthsea

Incomplete map of Earthsea

Ursula K. Le Guin, creatrix of Earthsea, is a much better writer than J.R.R. Tolkien, creator of Middle-earth: much more subtle, skilful and sophisticated. But for me Middle-earth has one big advantage over Earthsea: I can imagine Middle-earth really existing. I can’t say that for Earthsea, an archipelago-world of fishermen, goatherds and wizards. There’s something dead and disconnected about Earthsea. I’m not sure what it is, but it may have something to do with Le Guin’s dedicated political correctness.

For example, despite the northern European climate and culture on Earthsea, a sea-faring world with lots of rain, mist, snow and mountains, most of the people are supposed to have dark skins. The ones that don’t – the white-skinned, blond-haired Kargs – are the bloodthirsty baddies of A Wizard of Earthsea (1968), the first book in the series. Balls to biology, in other words: there’s propaganda to propagate. So it’s not surprising that Le Guin’s father was a famous and respected figure in the mostly disreputable discipline of anthropology. Earthsea is fantasy for Guardian-readers, in short.

But I still like the idea of an archipelago-world: sea and islands, islands and sea. As Le Guin herself says: “We all have archipelagos in our minds.” That’s one of the reasons I like the Ulam spiral: it reminds me of Earthsea. Unlike Earthsea, however, the sea and islands go on for ever. In the Ulam spiral, the islands are the prime numbers and the sea is the composite numbers. It’s based on a counter-clockwise spiral of integers, like this:

145←144←143←142←141←140139←138←137←136←135←134←133
 ↓                                               ↑
146 101←100←099←098←097←096←095←094←093←092←091 132
 ↓   ↓                                       ↑   ↑
147 102 065←064←063←062←061←060←059←058←057 090 131
 ↓   ↓   ↓                                  ↑   ↑
148 103 066 037←036←035←034←033←032←031 056 089 130
 ↓   ↓   ↓   ↓                       ↑   ↑   ↑   ↑
149 104 067 038 017←016←015←014←013 030 055 088 129
 ↓   ↓   ↓   ↓   ↓               ↑      ↑   ↑   ↑
150 105 068 039 018 005←004←003 012 029 054 087 128
 ↓   ↓   ↓   ↓   ↓   ↓       ↑   ↑   ↑   ↑   ↑   ↑
151 106 069 040 019 006 001002 011 028 053 086 127
 ↓   ↓   ↓   ↓   ↓   ↓           ↑      ↑   ↑   
152 107 070 041 020 007→008→009→010 027 052 085 126
 ↓   ↓   ↓   ↓   ↓                   ↑   ↑   ↑   ↑
153 108 071 042 021→022→023→024→025→026 051 084 125
 ↓   ↓   ↓   ↓                           ↑   ↑   ↑
154 109 072 043→044→045→046→047→048→049→050 083 124
 ↓   ↓   ↓                                   ↑   ↑
155 110 073→074→075→076→077→078→079→080→081→082 123
 ↓   ↓                                           ↑
156 111→112→113→114→115→116→117→118→119→120→121→122
 ↓                                                   ↑
157→158→159→160→161→162→163→164→165→166→167→168→169→170

The spiral is named after Stanislaw Ulam (1909-84), a Polish mathematician who invented it while doodling during a boring meeting. When numbers are represented as pixels and 1 is green, the spiral looks like this – note the unique “knee” formed by 2, 3 (directly above 2) and 11 (to the right of 2):

Ulam spiral

Ulam spiral (animated)

(If the image above does not animate, please try opening it in a new window.)

Some prime-pixels are isolated, like eyots or aits (small islands) in the number-sea, but some touch corner-to-corner and form larger units, larger islands. There are also prime-diamonds, like islands with lakes on them. The largest island, with 19 primes, may come very near the centre of the spiral:

island1

Island 1 = (5, 7, 17, 19, 23, 37, 41, 43, 47, 67, 71, 73, 79, 103, 107, 109, 113, 149, 151) (i=19) (x=-3, y=3, n=37) (n=1 at x=0, y=0)

Here are some more prime-islands – prIslands or priminsulas – in the Ulam-sea that I find interesting or attractive for one reason or other:

island2

Island 2 = (281, 283, 353, 431, 433, 521, 523, 617, 619, 719, 827, 829, 947) (i=13) (x=6, y=-12, n=619)


island3

Island 3 = (20347, 20921, 21499, 21503, 22091, 22093, 22691, 23293, 23297, 23909, 23911, 24533, 25163, 25801, 26449, 27103, 27767, 28439) (i=18) (x=-39, y=-81, n=26449)


island4

Island 4 = (537347, 540283, 543227, 546179, 549139, 552107, 555083, 558067, 561059, 561061, 564059, 564061, 567067, 570083, 573107, 573109) (i=16) (x=375, y=-315, n=561061)


island5

Island 5 = (1259047, 1263539, 1263541, 1268039, 1272547, 1277063, 1281587, 1286119, 1290659, 1295207, 1299763) (i=11) (x=-561, y=399, n=1259047)


island6

Island 6 = (1341841, 1346479, 1351123, 1355777, 1360439, 1360441, 1365107, 1365109, 1369783, 1369787, 1369789, 1374473, 1379167) (i=13) (x=-585, y=-297, n=1369783)


island7

Island 7 = (2419799, 2419801, 2426027, 2426033, 2432263, 2432267, 2438507, 2438509, 2444759, 2451017, 2457283, 2463557) (i=12) (x=558, y=780, n=2432263)


island8

Island 8 = (3189833, 3196979, 3196981, 3204137, 3204139, 3211301, 3211303, 3218471, 3218473, 3218477, 3225653) (i=11) (x=-894, y=858, n=3196981)

Clock around the Rock

If you like minimalism, you should like binary. There is unsurpassable simplicity and elegance in the idea that any number can be reduced to a series of 1’s and 0’s. It’s unsurpassable because you can’t get any simpler: unless you use finger-counting, two symbols are the minimum possible. But with those two – a stark 1 and 0, true and false, yin and yang, sun and moon, black and white – you can conquer any number you please. 2 = 10[2]. 5 = 101. 100 = 1100100. 666 = 1010011010. 2013 = 11111011101. 9^9 = 387420489 = 10111000101111001000101001001. You can also perform any mathematics you please, from counting sheep to modelling the evolution of the universe.

Yin and Yang symbol

1 + 0 = ∞

But one disadvantage of binary, from the human point of view, is that numbers get long quickly: every doubling in size adds an extra digit. You can overcome that disadvantage using octal or hexadecimal, which compress blocks of binary into single digits, but those number systems need more symbols: eight and sixteen, as their names suggest. There’s an elegance there too, but binary goes masked, hiding its minimalist appeal beneath apparent complexity. It doesn’t need to wear a mask for computers, but human beings can appreciate bare binary too, even with our weak memories and easily tiring nervous systems. I especially like minimalist binary when it’s put to work on those most maximalist of numbers: the primes. You can compare integers, or whole numbers, to minerals. Some are like mica or shale, breaking readily into smaller parts, but primes are like granite or some other ultra-hard, resistant rock. In other words, some integers are easy to divide by other integers and some, like the primes, are not. Compare 256 with 257. 256 = 2^8, so it’s divisible by 128, 64, 32, 16, 8, 4, 2 and 1. 257 is a prime, so it’s divisible by nothing but itself and 1. Powers of two are easy to calculate and, in binary, very easy to represent:

2^0 = 1 = 1
2^1 = 2 = 10[2]
2^2 = 4 = 100
2^3 = 8 = 1000
2^4 = 16 = 10000
2^5 = 32 = 100000
2^6 = 64 = 1000000
2^7 = 128 = 10000000
2^8 = 256 = 100000000

Primes are the opposite: hard to calculate and usually hard to represent, whatever the base:

02 = 000010[2]
03 = 000011
05 = 000101
07 = 000111
11 = 001011
13 = 001101
17 = 010001
19 = 010011
23 = 010111
29 = 011101
31 = 011111
37 = 100101
41 = 101001
43 = 101011

Maximalist numbers, minimalist base: it’s a potent combination. But “brimes”, or binary primes, nearly all have one thing in common. Apart from 2, a special case, each brime must begin and end with 1. For the digits in-between, the God of Mathematics seems to be tossing a coin, putting 1 for heads, 0 for tails. But sometimes the coin will come up all heads or all tails: 127 = 1111111[2] and 257 = 100000001, for example. Brimes like that have a stark simplicity amid the jumble of 83 = 1010011[2], 113 = 1110001, 239 = 11101111, 251 = 11111011, 277 = 100010101, and so on. Brimes like 127 and 257 are also palindromes, or the same reading in both directions. But less simple brimes can be palindromes too:

73 = 1001001
107 = 1101011
313 = 100111001
443 = 110111011
1193 = 10010101001
1453 = 10110101101
1571 = 11000100011
1619 = 11001010011
1787 = 11011111011
1831 = 11100100111
1879 = 11101010111

But, whether they’re palindromes or not, all brimes except 2 begin and end with 1, so they can be represented as rings, like this:

Ouroboros5227

Those twelve bits, or binary digits, actually represent the thirteen bits of 5227 = 1,010,001,101,011. Start at twelve o’clock (digit 1 of the prime) and count clockwise, adding 1’s and 0’s till you reach 12 o’clock again and add the final 1. Then you’ve clocked around the rock and created the granite of 5227, which can’t be divided by any integers but itself and 1. Another way to see the brime-ring is as an Ouroboros (pronounced “or-ROB-or-us”), a serpent or dragon biting its own tail, like this:

Alchemical Ouroboros

Alchemical Ouroboros (1478)

Dragon Ouroboros

Another alchemical Ouroboros (1599)

But you don’t have to start clocking around the rock at midday or midnight. Take the Ouroboprime of 5227 and start at eleven o’clock (digit 12 of the prime), adding 1’s and 0’s as you move clockwise. When you’ve clocked around the rock, you’ll have created the granite of 6709, another prime:

Ouroboros6709

Other Ouroboprimes produce brimes both clockwise and anti-clockwise, like 47 = 101,111.

Clockwise

101,111 = 47
111,011 = 59
111,101 = 61

Anti-Clockwise

111,101 = 61
111,011 = 59
101,111 = 47

If you demand the clock-rocked brime produce distinct primes, you sometimes get more in one direction than the other. Here is 151 = 10,010,111:

Clockwise

10,010,111 = 151
11,100,101 = 229

Anti-Clockwise

11,101,001 = 233
11,010,011 = 211
10,100,111 = 167
10,011,101 = 157

The most productive brime I’ve discovered so far is 2,326,439 = 1,000,110,111,111,110,100,111[2], which produces fifteen distinct primes:

Clockwise (7 brimes)

1,000,110,111,111,110,100,111 = 2326439
1,100,011,011,111,111,010,011 = 3260371
1,110,100,111,000,110,111,111 = 3830207
1,111,101,001,110,001,101,111 = 4103279
1,111,110,100,111,000,110,111 = 4148791
1,111,111,010,011,100,011,011 = 4171547
1,101,111,111,101,001,110,001 = 3668593

Anti-Clockwise (8 brimes)

1,110,010,111,111,110,110,001 = 3768241
1,100,101,111,111,101,100,011 = 3342179
1,111,111,011,000,111,001,011 = 4174283
1,111,110,110,001,110,010,111 = 4154263
1,111,101,100,011,100,101,111 = 4114223
1,111,011,000,111,001,011,111 = 4034143
1,110,110,001,110,010,111,111 = 3873983
1,000,111,001,011,111,111,011 = 2332667


Appendix: Deciminimalist Primes

Some primes in base ten use only the two most basic symbols too. That is, primes like 11[10], 101[10], 10111[10] and 1011001[10] are composed of only 1’s and 0’s. Furthermore, when these numbers are read as binary instead, they are still prime: 11[2] = 3, 101[2] = 5, 10111[2] = 23 and 1011001[2] = 89. Here is an incomplete list of these deciminimalist primes:

11[10] = 1,011[2]; 11[2] = 3[10] is also prime.

101[10] = 1,100,101[2]; 101[2] = 5[10] is also prime.

10,111[10] = 10,011,101,111,111[2]; 10,111[2] = 23[10] is also prime.

101,111[10] = 11,000,101,011,110,111[2]; 101,111[2] = 47[10] is also prime.

1,011,001[10] = 11,110,110,110,100,111,001[2]; 1,011,001[2] = 89[10] is also prime.

1,100,101[10] = 100,001,100,100,101,000,101[2]; 1,100,101[2] = 101[10] is also prime.

10,010,101[10] = 100,110,001,011,110,111,110,101[2]; 10,010,101[2] = 149[10] is also prime.

10,011,101[10] = 100,110,001,100,000,111,011,101[2]; 10,011,101[2] = 157[10] is also prime.

10,100,011[10] = 100,110,100,001,110,100,101,011[2]; 10,100,011[2] = 163[10] is also prime.

10,101,101[10] = 100,110,100,010,000,101,101,101[2]; 10,101,101[2] = 173[10] is also prime.

10,110,011[10] = 100,110,100,100,010,000,111,011[2]; 10,110,011[2] = 179[10] is also prime.

10,111,001[10] = 100,110,100,100,100,000,011,001[2].

11,000,111[10] = 101,001,111,101,100,100,101,111[2]; 11,000,111[2] = 199[10] is also prime.

11,100,101[10] = 101,010,010,101,111,111,000,101[2]; 11,100,101[2] = 229[10] is also prime.

11,110,111[10] = 101,010,011,000,011,011,011,111[2].

11,111,101[10] = 101,010,011,000,101,010,111,101[2].

100,011,001[10] = 101,111,101,100,000,101,111,111,001[2]; 100,011,001[2] = 281[10] is also prime.

100,100,111[10] = 101,111,101,110,110,100,000,001,111[2].

100,111,001[10] = 101,111,101,111,001,001,010,011,001[2]; 100,111,001[2] = 313[10] is also prime.

101,001,001[10] = 110,000,001,010,010,011,100,101,001[2].

101,001,011[10] = 110,000,001,010,010,011,100,110,011[2]; 101,001,011[2] = 331[10] is also prime.

101,001,101[10] = 110,000,001,010,010,011,110,001,101[2].

101,100,011[10] = 110,000,001,101,010,100,111,101,011[2].

101,101,001[10] = 110,000,001,101,010,110,111,001,001[2].

101,101,111[10] = 110,000,001,101,010,111,000,110,111[2]; 101,101,111[2] = 367[10] is also prime.

101,110,111[10] = 110,000,001,101,101,000,101,011,111[2].

101,111,011[10] = 110,000,001,101,101,010,011,100,011[2]; 101,111,011[2] = 379[10] is also prime.

101,111,111[10] = 110,000,001,101,101,010,101,000,111[2]; 101,111,111[2] = 383[10] is also prime.

110,010,101[10] = 110,100,011,101,001,111,011,110,101[2].

110,100,101[10] = 110,100,011,111,111,111,010,000,101[2]; 110,100,101[2] = 421[10] is also prime.

110,101,001[10] = 110,100,100,000,000,001,000,001,001[2].

110,110,001[10] = 110,100,100,000,010,010,100,110,001[2]; 110,110,001[2] = 433[10] is also prime.

110,111,011[10] = 110,100,100,000,010,100,100,100,011[2]; 110,111,011[2] = 443[10] is also prime.

Three Is The Key

If The Roses of Heliogabalus (1888) is any guide, Sir Lawrence Alma-Tadema (1836-1912) thought that 222 is a special number. But his painting doesn’t exhaust its secrets. To get to another curiosity of 222, start with 142857. As David Wells puts it in his Penguin Dictionary of Curious and Interesting Numbers (1986), 142857 is a “number beloved of all recreational mathematicians”. He then describes some of its properties, including this:

142857 x 1 = 142857
142857 x 2 = 285714
142857 x 3 = 428571
142857 x 4 = 571428
142857 x 5 = 714285
142857 x 6 = 857142

The multiples are cyclic permutations: the order of the six numbers doesn’t change, only their starting point. Because each row contains the same numbers, it sums to the same total: 1 + 4 + 2 + 8 + 5 + 7 = 27. And because each row begins with a different number, each column contains the same six numbers and also sums to 27, like this:

1 4 2 8 5 7
+ + + + + +
2 8 5 7 1 4
+ + + + + +
4 2 8 5 7 1
+ + + + + +
5 7 1 4 2 8
+ + + + + +
7 1 4 2 8 5
+ + + + + +
8 5 7 1 4 2

= = = = = =

2 2 2 2 2 2
7 7 7 7 7 7

If the diagonals of the square also summed to the same total, the multiples of 142857 would create a full magic square. But the diagonals don’t have the same total: the left-right diagonal sums to 31 and the right-left to 23 (note that 31 + 23 = 54 = 27 x 2).

But where does 142857 come from? It’s actually the first six digits of the reciprocal of 7, i.e. 1/7 = 0·142857… Those six numbers repeat for ever, because 1/7 is a prime reciprocal with maximum period: when you calculate 1/7, all integers below 7 are represented in the remainders. The square of multiples above is simply another way of representing this:

1/7 = 0·142857…
2/7 = 0·285714…
3/7 = 0·428571…
4/7 = 0·571428…
5/7 = 0·714285…
6/7 = 0·857142…
7/7 = 0·999999…

The prime reciprocals 1/17 and 1/19 also have maximum period, so the squares created by their multiples have the same property: each row and each column sums to the same total, 72 and 81, respectively. But the 1/19 square has an additional property: both diagonals sum to 81, so it is fully magic:

01/19 = 0·0 5 2 6 3 1 5 7 8 9 4 7 3 6 8 4 2 1
02/19 = 0·1 0 5 2 6 3 1 5 7 8 9 4 7 3 6 8 4 2…
03/19 = 0·1 5 7 8 9 4 7 3 6 8 4 2 1 0 5 2 6 3…
04/19 = 0·2 1 0 5 2 6 3 1 5 7 8 9 4 7 3 6 8 4…
05/19 = 0·2 6 3 1 5 7 8 9 4 7 3 6 8 4 2 1 0 5…
06/19 = 0·3 1 5 7 8 9 4 7 3 6 8 4 2 1 0 5 2 6…
07/19 = 0·3 6 8 4 2 1 0 5 2 6 3 1 5 7 8 9 4 7…
08/19 = 0·4 2 1 0 5 2 6 3 1 5 7 8 9 4 7 3 6 8…
09/19 = 0·4 7 3 6 8 4 2 1 0 5 2 6 3 1 5 7 8 9…
10/19 = 0·5 2 6 3 1 5 7 8 9 4 7 3 6 8 4 2 1 0…
11/19 = 0·5 7 8 9 4 7 3 6 8 4 2 1 0 5 2 6 3 1…
12/19 = 0·6 3 1 5 7 8 9 4 7 3 6 8 4 2 1 0 5 2…
13/19 = 0·6 8 4 2 1 0 5 2 6 3 1 5 7 8 9 4 7 3…
14/19 = 0·7 3 6 8 4 2 1 0 5 2 6 3 1 5 7 8 9 4…
15/19 = 0·7 8 9 4 7 3 6 8 4 2 1 0 5 2 6 3 1 5…
16/19 = 0·8 4 2 1 0 5 2 6 3 1 5 7 8 9 4 7 3 6…
17/19 = 0·8 9 4 7 3 6 8 4 2 1 0 5 2 6 3 1 5 7…
18/19 = 0·9 4 7 3 6 8 4 2 1 0 5 2 6 3 1 5 7 8

First line = 0 + 5 + 2 + 6 + 3 + 1 + 5 + 7 + 8 + 9 + 4 + 7 + 3 + 6 + 8 + 4 + 2 + 1 = 81

Left-right diagonal = 0 + 0 + 7 + 5 + 5 + 9 + 0 + 3 + 0 + 4 + 2 + 8 + 7 + 5 + 6 + 7 + 5 + 8 = 81

Right-left diagonal = 9 + 9 + 2 + 4 + 4 + 0 + 9 + 6 + 9 + 5 + 7 + 1 + 2 + 4 + 3 + 2 + 4 + 1 = 81

In base 10, this doesn’t happen again until the 1/383 square, whose magic total is 1719 (= 383-1 x 10-1 / 2). But recreational maths isn’t restricted to base 10 and lots more magic squares are created by lots more primes in lots more bases. The prime 223 in base 3 is one of them. Here the first line is

1/223 = 1/220213 = 0·

0000100210210102121211101202221112202
2110211112001012200122102202002122220
2110110201020210001211000222011010010
2222122012012120101011121020001110020
0112011110221210022100120020220100002
0112112021202012221011222000211212212…

The digits sum to 222, so 222 is the magic total for all rows and columns of the 1/223 square. It is also the total for both diagonals, so the square is fully magic. I doubt that Alma-Tadema knew this, because he lived before computers made calculations like that fast and easy. But he was probably a Freemason and, if so, would have been pleased to learn that 222 had a link with squares.

Central Government

A magic square is a square of numbers in which all rows and columns and both diagonals add to the same number, or the magic total. The 3×3 magic square, also known as the Lo Shu square (“scroll of the River Lo” square), uses the numbers 1 to 9 and has a magic total of 15. I haven’t seen it explicitly stated anywhere on the net, perhaps because it’s trivially obvious to proper mathematicians, but in this and other 3×3 magic squares, the magic total must be three times the central number. Here is the proof:

4 9 2
3 5 7
8 1 6
a b c
d e f
g h i

1. a + b + c = a + e + i = b + e + h = c + e + g

2. 3(a + b + c) = (a + e + i) + (b + e + h) + (c + e + g)

3. 3a + 3b + 3c = 3e + a + i + b + h + c + g

4. 2a + 2b + 2c = 3e + g + h + i

5. 2a + 2b + 2c – (g + h + i) = 3e

6. 3e = a + b + c = magic total

Update: In fact, this fact about 3×3 squares is mentioned a lot on the web. See, for example, Negative Magic Squares, which describes a proof discovered by Māori mathematicians in 736 B.C.E.

Some 3×3 magic squares using entirely prime numbers (except for 1 in the first square):

00043 00001 00067
00061 00037 00013
00007 00073 00031 mt = 111 = 37 x 3

00071 00005 00101
00089 00059 00029
00017 00113 00047 mt = 177 = 59 x 3

00083 00029 00101
00089 00071 00053
00041 00113 00059 mt = 213 = 71 x 3

00103 00007 00109
00079 00073 00067
00037 00139 00043 mt = 219 = 73 x 3

00107 00011 00149
00131 00089 00047
00029 00167 00071 mt = 267 = 89 x 3

00139 00007 00163
00127 00103 00079
00043 00199 00067 mt = 309 = 103 x 3

12841 09769 15013
14713 12541 10369
10069 15313 12241 mt = 37623 = 12541 x 3

12721 07753 17167
16993 12547 08101
07927 17341 12373 mt = 37641 = 12547 x 3

13183 08059 16417
15787 12553 09319
08689 17047 11923 mt = 37659 = 12553 x 3

Stoch’! (In the Name of Dove)

Stochasma, In Abysso (2012)

The Sueco-Georgian avant-gardists Stochasma were formed, in their own words, “to interrogate, eviscerate, and exterminate the ultimate experimental envelope of acoustic idiosyncrasy”. That’s “Sueco-” as in Sweden and “Georgian” as in the Eurasian nation, not the American state, by the way. Going one up on some bands from Wales, Ireland and Scotland, who issue their material bilingually, in English and one or another of the Celtic languages, Stochasma issue all their material tri-lingually, in English, Swedish, and Georgian. The strangeness and beauty of the Georgian script match and enhance the strangeness and (occasional) beauty of their music, but, unlike their last two releases, there’s no spoken English, Swedish or Georgian here: In Abysso is intended to be an “abhuman listen”.

Front cover of Stochasma's album In Abysso 

Believe me, it is! The title of the album is Latin for “In the Abyss” and the liner-notes extend thanks to H.P. Lovecraft, Clark Ashton Smith and Stanislaw Ulam for “infernal inspiration”. If the last name makes you think “Who?” (or “U?”), you must be new/nu to Stochasma, who draw inspiration not just from art and literature, but from mathematics too. Stanislaw Ulam (1909-84) was a Polish mathematician perhaps most famous for inventing the “Ulam spiral”, a graphical representation of the prime numbers that reveals mysterious patterns in this strange and fascinating set of integers. Ulam stumbled across the spiral while “doodling” during a boring lecture at a scientific meeting. That kind of serendipity has always been important to Stochasma, who explore the musical abyss/chasm partly through random, or stochastic, techniques. For the first track, “Pr1m4l Skr33m”, the five members of the band had electrodes attached to their nipples before being asked, at random, to indicate, with a nod or shake of the head, whether a randomly selected number between 1 and 10,000 was prime or composite (for example, 1,433 is prime, being divisible by no numbers but itself and 1; 1,434 is composite, being divisible by 2, 3 and 239). If they were wrong, they received a painful electric shock.

The resultant collection of grunts, gasps, and screams was electronically worked over in fully traditional Stochasma fashion to create “Pr1m4l Skr33m”, which sounds like a fully traditional Stochasma track: fucking weird and unsettling! Is the irregular chorus of voices in agony or ecstasy? Are the band being tortured in a hell run by sadists or pleasured in a heaven run for masochists? Or both? It’s hard to decide, and at times hard to listen, but as Stochasma themselves put it: “We’re queasy listening, not easy – easy listening is for cubes.”

Elsewhere, the band have used the ultra-sensitive microphones they first experimented with on 2003’s AnguisaquA (sic – it literally means “SnakewateR”). This time they’ve recorded the bloodflow of a dove and the movements of parasites in its feathers for “Täubchen”, which sounds even stranger than it reads. That and “Pr1m4l Skr33m” are the first two tracks: the next fifteen are entitled “Ignisigil I” to “Ignisigil XV”. Stochasma used a fire-proof microphone to record the sound of books being burned. They selected fifteen wildly different authors for this literally incendiary homage, from “J. Aldapuerta to J. Archer, from K. Marx to K. Minogue”, as they themselves put it. (That’s the über-trangressive Spanish horror-writer Jesús Aldapuerta and the über-cruddy British thriller-writer Jeffrey Archer, and the Anglo-German philosophaster Karl Marx and the Australian pop-pixie Kylie Minogue, for those unfamiliar with the names.) And the band insist, perhaps tongue-in-cheek, that the sonic textures of the recordings are dependent not just on the physical nature of the paper and ink being burnt, but also on the ideological and aesthetic nature of the burning text.

It’s hard to agree: the “Ignisigils” all sound pretty much alike to me, though that sound is uncharacteristically soothing and relaxing by Stochasma standards (on my first listen, I dropped off during “Ignisigil VIII” and didn’t wake up till “Ignisigil XI”). The album is rounded off with three of the strangest pieces of music I’ve heard this century: “Musgomorrah”, “Gradus ad Parnassum”, and “CoMoXoCoI”. The first sounds like a slowed recording of men in armour fighting in thick mud; the second like a choir of giant glass insects singing themselves to splinters; and the third like echoes chasing each another in a collapsing or burning maze. These three might grow on me or might not: for now, “Pr1m4l Skr33m”, “Täubchen”, and “Ignisigil IV” hit the sonic sweet’n’sour spot that Stochasma seem to have copyrighted. I don’t know why “IV” hits the spot and the rest of the Ignisigils don’t, but that’s often the way with Stochasma: you like the sounds they create and you haven’t a clue as to why. In company with a select band of other electronicognoscenti, I look forward to their seventh album, whenever it appears and whatever musical mélanges or macedoines it manages to mulch, mangle, and miscegenate.


Elsewhere other-engageable:

Musings on Music