For Revver and Fevver

This shape reminds me of the feathers on an exotic bird:

feathers

(click or open in new window for full size)


feathers_anim

(animated version)


The shape is created by reversing the digits of a number, so you could say it involves revvers and fevvers. I discovered it when I was looking at the Halton sequence. It’s a sequence of fractions created according to a simple but interesting rule. The rule works like this: take n in base b, reverse it, and divide reverse(n) by the first power of b that is greater thann.

For example, suppose n = 6 and b = 2. In base 2, 6 = 110 and reverse(110) = 011 = 11 = 3. The first power of 2 that is greater than 6 is 2^3 or 8. Therefore, halton(6) in base 2 equals 3/8. Here is the same procedure applied to n = 1..20:

1: halton(1) = 1/10[2] → 1/2
2: halton(10) = 01/100[2] → 1/4
3: halton(11) = 11/100[2] → 3/4
4: halton(100) = 001/1000[2] → 1/8
5: halton(101) = 101/1000[2] → 5/8
6: halton(110) = 011/1000 → 3/8
7: halton(111) = 111/1000 → 7/8
8: halton(1000) = 0001/10000 → 1/16
9: halton(1001) = 1001/10000 → 9/16
10: halton(1010) = 0101/10000 → 5/16
11: halton(1011) = 1101/10000 → 13/16
12: halton(1100) = 0011/10000 → 3/16
13: halton(1101) = 1011/10000 → 11/16
14: halton(1110) = 0111/10000 → 7/16
15: halton(1111) = 1111/10000 → 15/16
16: halton(10000) = 00001/100000 → 1/32
17: halton(10001) = 10001/100000 → 17/32
18: halton(10010) = 01001/100000 → 9/32
19: halton(10011) = 11001/100000 → 25/32
20: halton(10100) = 00101/100000 → 5/32…

Note that the sequence always produces reduced fractions, i.e. fractions in their lowest possible terms. Once 1/2 has appeared, there is no 2/4, 4/8, 8/16…; once 3/4 has appeared, there is no 6/8, 12/16, 24/32…; and so on. If the fractions are represented as points in the interval [0,1], they look like this:

line1_1_2

point = 1/2


line2_1_4

point = 1/4


line3_3_4

point = 3/4


line4_1_8

point = 1/8


line5_5_8

point = 5/8


line6_3_8

point = 3/8


line7_7_8

point = 7/8


line_b2_anim

(animated line for base = 2, n = 1..63)


It’s apparent that Halton points in base 2 will evenly fill the interval [0,1]. Now compare a Halton sequence in base 3:

1: halton(1) = 1/10[3] → 1/3
2: halton(2) = 2/10[3] → 2/3
3: halton(10) = 01/100[3] → 1/9
4: halton(11) = 11/100[3] → 4/9
5: halton(12) = 21/100[3] → 7/9
6: halton(20) = 02/100 → 2/9
7: halton(21) = 12/100 → 5/9
8: halton(22) = 22/100 → 8/9
9: halton(100) = 001/1000 → 1/27
10: halton(101) = 101/1000 → 10/27
11: halton(102) = 201/1000 → 19/27
12: halton(110) = 011/1000 → 4/27
13: halton(111) = 111/1000 → 13/27
14: halton(112) = 211/1000 → 22/27
15: halton(120) = 021/1000 → 7/27
16: halton(121) = 121/1000 → 16/27
17: halton(122) = 221/1000 → 25/27
18: halton(200) = 002/1000 → 2/27
19: halton(201) = 102/1000 → 11/27
20: halton(202) = 202/1000 → 20/27
21: halton(210) = 012/1000 → 5/27
22: halton(211) = 112/1000 → 14/27
23: halton(212) = 212/1000 → 23/27
24: halton(220) = 022/1000 → 8/27
25: halton(221) = 122/1000 → 17/27
26: halton(222) = 222/1000 → 26/27
27: halton(1000) = 0001/10000 → 1/81
28: halton(1001) = 1001/10000 → 28/81
29: halton(1002) = 2001/10000 → 55/81
30: halton(1010) = 0101/10000 → 10/81

And here is an animated gif representing the Halton sequence in base 3 as points in the interval [0,1]:

line_b3_anim


Halton points in base 3 also evenly fill the interval [0,1]. What happens if you apply the Halton sequence to a two-dimensional square rather a one-dimensional line? Suppose the bottom left-hand corner of the square has the co-ordinates (0,0) and the top right-hand corner has the co-ordinates (1,1). Find points (x,y) inside the square, with x supplied by the Halton sequence in base 2 and y supplied by the Halton sequence in base 3. The square will gradually fill like this:

square1

x = 1/2, y = 1/3


square2

x = 1/4, y = 2/3


square3

x = 3/4, y = 1/9


square4

x = 1/8, y = 4/9


square5

x = 5/8, y = 7/9


square6

x = 3/8, y = 2/9


square7

x = 7/8, y = 5/9


square8

x = 1/16, y = 8/9


square9

x = 9/16, y = 1/27…


square_anim

animated square


Read full page: For Revver and Fevver

Shareway to Seven

An adaptation of an interesting distribution puzzle from Joseph Degrazia’s Math is Fun (1954):

After a successful year of plunder on the high seas, a pirate ship returns to its island base. The pirate chief, who enjoys practical jokes and has a mathematical bent, hands out heavy bags of gold coins to his seven lieutenants. But when the seven lieutenants open the bags, they discover that each of them has received a different number of coins.

They ask the captain why they don’t have equal shares. The pirate chief laughs and tells them to re-distribute the coins according to the following rule: “At each stage, the lieutenant with most coins must give each of his comrades as many coins as that comrade already possesses.”

The lieutenants follow the rule and each one in turn becomes the lieutenant with most coins. When the seventh distribution is over, all seven of them have 128 coins, the coins are fairly distributed, and the rule no longer applies.

The puzzle is this: How did the pirate captain originally allocate the coins to his lieutenants?


If you start at the beginning and work forward, you’ll have to solve a fiendishly complicated set of simultaneous equations. If you start at the end and work backwards, the puzzle will resolve itself almost like magic.

The puzzle is actually about powers of 2, because 128 = 2^7 and when each of six lieutenants receives as many coins as he already has, he doubles his number of coins. Accordingly, before the seventh and final distribution, six of the lieutenants must have had 64 coins and the seventh must have had 128 + 6 * 64 coins = 512 coins.

At the stage before that, five of the lieutenants must have had 32 coins (so that they will have 64 coins after the sixth distribution), one must have had 256 coins (so that he will have 512 coins after the sixth distribution), and one must have had 64 + 5 * 32 + 256 coins = 480 coins. And so on. This is what the solution looks like:

128, 128, 128, 128, 128, 128, 128
512, 64, 64, 64, 64, 64, 64
256, 480, 32, 32, 32, 32, 32
128, 240, 464, 16, 16, 16, 16
64, 120, 232, 456, 8, 8, 8
32, 60, 116, 228, 452, 4, 4
16, 30, 58, 114, 226, 450, 2
8, 15, 29, 57, 113, 225, 449

So the pirate captain must have originally allocated the coins like this: 8, 15, 29, 57, 113, 225, 449 (note how 8 * 2 – 1 = 15, 15 * 2 – 1 = 29, 29 * 2 – 1 = 57…).

The puzzle can be adapted to other powers. Suppose the rule runs like this: “At each stage, the lieutenant with most coins must give each of his comrades twice as many coins as that comrade already possesses.” If the pirate captain has six lieutenants, after each distribution each of five will have n + 2n = three times the number of coins that he previously possessed. The six lieutenants each end up with 729 coins = 3^6 coins and the solution looks like this:

13, 37, 109, 325, 973, 2917
39, 111, 327, 975, 2919, 3
117, 333, 981, 2925, 9, 9
351, 999, 2943, 27, 27, 27
1053, 2997, 81, 81, 81, 81
3159, 243, 243, 243, 243, 243
729, 729, 729, 729, 729, 729

For powers of 4, the rule runs like this: “At each stage, the lieutenant with most coins must give each of his comrades three times as many coins as that comrade already possesses.” With five lieutenants, each of them ends up with 1024 coins = 4^5 coins and the solution looks like this:

16, 61, 241, 961, 3841
64, 244, 964, 3844, 4
256, 976, 3856, 16, 16
1024, 3904, 64, 64, 64
4096, 256, 256, 256, 256
1024, 1024, 1024, 1024, 1024

For powers of 5, the rule runs like this: “At each stage, the lieutenant with most coins must give each of his comrades four times as many coins as that comrade already possesses.” With four lieutenants, each of them ends up with 625 coins = 5^4 coins and the solution looks like this:

17, 81, 401, 2001
85, 405, 2005, 5
425, 2025, 25, 25
2125, 125, 125, 125
625, 625, 625, 625

Power Trip

Here are the first few powers of 2:

2 = 1 * 2
4 = 2 * 2
8 = 4 * 2
16 = 8 * 2
32 = 16 * 2
64 = 32 * 2
128 = 64 * 2
256 = 128 * 2
512 = 256 * 2
1024 = 512 * 2
2048 = 1024 * 2
4096 = 2048 * 2
8192 = 4096 * 2
16384 = 8192 * 2
32768 = 16384 * 2
65536 = 32768 * 2
131072 = 65536 * 2
262144 = 131072 * 2
524288 = 262144 * 2
1048576 = 524288 * 2
2097152 = 1048576 * 2
4194304 = 2097152 * 2
8388608 = 4194304 * 2
16777216 = 8388608 * 2
33554432 = 16777216 * 2
67108864 = 33554432 * 2…

As you can see, it’s a one-way power-trip: the numbers simply get larger. But what happens if you delete the digit 0 whenever it appears in a result? For example, 512 * 2 = 1024, which becomes 124. If you apply this rule, the sequence looks like this:

2 * 2 = 4
4 * 2 = 8
8 * 2 = 16
16 * 2 = 32
32 * 2 = 64
64 * 2 = 128
128 * 2 = 256
256 * 2 = 512
512 * 2 = 1024 → 124
124 * 2 = 248
248 * 2 = 496
496 * 2 = 992
992 * 2 = 1984
1984 * 2 = 3968
3968 * 2 = 7936
7936 * 2 = 15872
15872 * 2 = 31744
31744 * 2 = 63488
63488 * 2 = 126976
126976 * 2 = 253952
253952 * 2 = 507904 → 5794
5794 * 2 = 11588
11588 * 2 = 23176
23176 * 2 = 46352
46352 * 2 = 92704 → 9274…

Is this a power-trip? Not quite: it’s a return trip, because the numbers can never grow beyond a certain size and the sequence falls into a loop. If the result 2n contains a zero, then zerodelete(2n) < n, so the sequence has an upper limit and a number will eventually occur twice. This happens at step 526 with 366784, which matches 366784 at step 490.

The rate at which we delete zeros can obviously be varied. Call it 1:z. The sequence above sets z = 1, so 1:z = 1:1. But what if z = 2, so that 1:z = 1:2? In other words, the procedure deletes every second zero. The first zero occurs when 1024 = 2 * 512, so 1024 is left as it is. The second zero occurs when 2 * 1024 = 2048, so 2048 becomes 248. When z = 2 and every second zero is deleted, the sequence begins like this:

1 * 2 = 2
2 * 2 = 4
4 * 2 = 8
8 * 2 = 16
16 * 2 = 32
32 * 2 = 64
64 * 2 = 128
128 * 2 = 256
256 * 2 = 512
512 * 2 = 1024 → 1024
1024 * 2 = 2048 → 248
248 * 2 = 496
496 * 2 = 992
992 * 2 = 1984
1984 * 2 = 3968
3968 * 2 = 7936
7936 * 2 = 15872
15872 * 2 = 31744
31744 * 2 = 63488
63488 * 2 = 126976
126976 * 2 = 253952
253952 * 2 = 507904 → 50794
50794 * 2 = 101588 → 101588
101588 * 2 = 203176 → 23176
23176 * 2 = 46352
46352 * 2 = 92704 → 92704
92704 * 2 = 185408 → 18548

This sequence also has a ceiling and repeats at step 9134 with 5458864, which matches 5458864 at step 4166. And what about the sequence in which z = 3 and every third zero is deleted? Does this have a ceiling or does the act of multiplying by 2 compensate for the slower removal of zeros?

In fact, it can’t do so. The larger 2n becomes, the more zeros it will tend to contain. If 2n is large enough to contain 3 zeros on average, the deletion of zeros will overpower multiplication by 2 and the sequence will not rise any higher. Therefore the sequence that deletes every third zero will eventually repeat, although I haven’t been able to discover the relevant number.

But this reasoning applies to any rate, 1:z, of zero-deletion. If z = 100 and every hundredth zero is deleted, numbers in the sequence will rise to the point at which 2n contains sufficient zeros on average to counteract multiplication by 2. The sequence will have a ceiling and will eventually repeat. If z = 10^100 or z = 10^(10^100) and every googolth or googolplexth zero is deleted, the same is true. For any rate, 1:z, at which zeros are deleted, the sequence n = zerodelete(2n,z) has an upper limit and will eventually repeat.

Will Two Power?

It’s such a simple thing: repeatedly doubling a number: 1, 2, 4, 8, 16, 32, 61, 128… And yet it yields such riches, reminiscent of DNA or a literary text:

2^0 = 1
2^1 = 2
2^2 = 4
2^3 = 8
2^4 = 16
2^5 = 32
2^6 = 64
2^7 = 128
2^8 = 256
2^9 = 512
2^10 = 1024
2^20 = 1048576
2^30 = 1073741824
2^40 = 1099511627776
2^50 = 1125899906842624
2^60 = 1152921504606846976
2^70 = 1180591620717411303424
2^80 = 1208925819614629174706176
2^90 = 1237940039285380274899124224
2^100 = 1267650600228229401496703205376
2^200 = 1606938044258990275541962092341162602522202993782792835301376

Although, by Benford’s law*, 1 is the commonest leading digit, do all numbers eventually appear as the leading digits of some power of 2? I conjecture that they do. indeed, I conjecture that they do infinitely often. If the function first(n) returns the power of 2 whose leading digits are the same as the digits of n, then:

first(1) = 2^0 = 1
first(2) = 2^1 = 2
first(3) = 2^5 = 32
first(4) = 2^2 = 4
first(5) = 2^9 = 512
first(6) = 2^6 = 64
first(7) = 2^46 = 70368744177664
first(8) = 2^3 = 8
first(9) = 2^53 = 9007199254740992
first(10) = 2^10 = 1024

And I conjecture that this is true of all bases except bases that are powers of 2, like 2, 4, 8, 16 and so on. A related question is whether the leading digits of any 2^n are the same as the digits of n. Yes:

2^6 = 64
2^10 = 1024
2^1542 = 1.54259995… * 10^464
2^77075 = 7.70754024… * 10^23201
2^113939 = 1.13939932… * 10^34299
2^1122772 = 1.12277217… * 10^337988

That looks like a look of calculation, but there’s a simple way to cut it down: restrict the leading digits. Eventually they will lose accuracy, because the missing digits are generating carries. With four leading digits, this happens:

1: 0001
2: 0002
4: 0004
8: 0008
16: 0016
32: 0032
64: 0064
128: 0128
256: 0256
512: 0512
1024: 1024
2048: 2048
4096: 4096
8192: 8192
16384: 1638…
32768: 3276…
65536: 6552…

But working with only fifteen leading digits, you can find that 1122772 = the leading digits of 2^1122772, which has 337989 digits when calculated in full.


Previously pre-posted (please peruse):

Talcum Power


*Not Zipf’s law, as I originally said.

The World as Worm

In “Hymn to Herm”, I wrote about a religion based on √2, or the square root of two, the number that, multiplied by itself, equals 2. In the religion, neophytes learn the mystery and majesty of this momentous number when they try to calculate its exact value. The calculation involves adding and subtracting fractions based on powers of two. The first step is this: 1 x 1 = 1. So that’s too small. Add 1/2^1 = ½ and re-multiply: 1½ x 1½ = 2¼. Too big. So subtract 1/2^2 = ¼, and re-multiply. 1¼ x 1¼ = 1+9/16. Too small. Add 1/8 and re-multiply. 1+3/8 x 1+3/8 = 1+57/64. Too small again. Add 1/16 and re-multiply. And so on.

In effect, what the neophytes are doing is calculate the digits of √2 in binary, or base two. When the multiplication is too small, put a 1; when it’s too big, put a 0. Like this:

1 x 1 = 1 < 2, so √2 ≈ 1·…
1½ x 1½ = 2¼ > 2, so √2 ≈ 1·0…
1¼ x 1¼ = 1+9/16 < 2, so √2 ≈ 1·01…
(1+3/8) x (1+3/8) = 1+57/64 < 2, so √2 ≈ 1·011…
(1+7/16) x (1+7/16) = 2+17/256 > 2, so √2 ≈ 1·0110…
(1+13/32) x (1+13/32) = 1+1001/1024 < 2, so √2 ≈ 1.01101…
(1+27/64) x (1+27/64) = 2+89/4096 > 2, so √2 ≈ 1.011010…
(1+53/128) x (1+53/128) = 1+16377/16384 < 2, so √2 ≈ 1·0110101…
(1+107/256) x (1+107/256) = 2+697/65536 > 2, so √2 ≈ 1·01101010…
(1+213/512) x (1+213/512) = 2+1337/262144 > 2, so √2 ≈ 1·011010100…
(1+425/1024) x (1+425/1024) = 2+2449/1048576 > 2, so √2 ≈ 1·0110101000…
(1+849/2048) x (1+849/2048) = 2+4001/4194304 > 2, so √2 ≈ 1·01101010000…
(1+1697/4096) x (1+1697/4096) = 2+4417/16777216 > 2, so √2 ≈ 1·011010100000…
(1+3393/8192) x (1+3393/8192) = 1+67103361/67108864 < 2, so √2 ≈ 1·0110101000001…

Mathematically naïve neophytes, seeing the process miss 2 by smaller and smaller amounts on either side, might imagine that eventually the exact root will appear and the calculations end. But they would be wrong. They could work a year or a million years: they would never calculate the exact square root of two. There is no ratio of whole numbers, a/b, such that a^2/b^2 = 2. In other words, √2 is an irrational number, or number that can’t be represented as a ratio of integers (please see appendix for the proof).

This discovery, made by Greek mathematicians more than two millennia ago, is both mind-boggling and world-shattering. In fact, it’s mind-boggling in part because it’s world-shattering. √2 shatters the world because the world is too small to contain it: in the words of the Cult of Infinite Hermaphrodites, “Were the sky all parchment, the seas all ink, and gulls all plucked for quills”, the square root of two could not be recorded in full. This is far more certain than tomorrow’s sunrise, because predicting tomorrow’s sunrise depends on fallible scientific reasoning from incomplete knowledge. Proving the irrationality of √2 depends on infallible mathematical reasoning.

At least, it’s as close to infallible as human beings can get. But that’s another part of what is mind-boggling about √2. A finite, feeble human being, with a speck of soon-decaying brain, can prove the existence of things larger than the universe. A few binary digits of √2 are shown above. Here are a few more:

1·
0110101000001001111001100110011111110011101111001100100100001000
1011001011111011000100110110011011101010100101010111110100111110
0011101011011110110000010111010100010010011101110101000010011001
1101101000101111010110010000101100000110011001110011001000101010
1001010111111001000001100000100001110101011100010100010110000111
0101000101100011111111001101111110111001000001111011011001110010 
0001111011101001010100001011110010000111001110001111011010010100 
1111000000001001000011100110110001111011111101000100111011010001 
1010010001000000010111010000111010000101010111100011111010011100 
1010011000001011001110001100000000100011011110000110011011110111 
1001010101100011011110010010001000101101000100001000101100010100 
1000110000010101011110001110010001011110111110001001110001100111 
1000110110101011010100010100011100010111011011111101001110111001 
1001011001010100110001101000011001100011111001111001000010011011 
1110101001011110001001000001111100000110110111001011000001011101 
1101010101001001010000010001001100100000100000011001010010010101 
0000001001110010100101010110110110110001111110100001110111111011 
1110100110100111010000000101100111010111100100100111110000011000 
1000010011001001101101010111100110101010010100010110110010100011 
0111000110011110011010000011011011011111000001000110110110001110 
0000001000001001101110000000001111111100011001000110101001011110 
0110011001010100101111010011111011110111101101000011110101111111 
1110110101000011011111000111111110010100010001000010011000001111 
1011110101000000110001001000001111101111010101010000001110000101 
1000001111111001011110111011110101000101111011111011100001100110 
0011000100000111000101000101110101011111111010111110011101100101 
1010010010011110100101001110110001111111010110010111000100000101 
1111101111111100001011100001111110100111011000111110111100000001 
1111001101011001100111001000001011110010111111100101000000001011 
1000010010001100111100001011110100100101001010101110000001000110 
1011111110011111000111101111011110010100011111010100011001110110 
1001101011111000110000010100101111001100011001111100011111000010 
1001000010111110011101101001001010011011000001010111100011000001 
0000101101011000010011111011010010000111110010010010010011110101 
1011011100011111100000101101110011010010100100000011011000001001 
1101111011101000100100010010100110000011110101001110101010101101 
0000111011101010001100100001111101110100100010011111010001101010 
0111111010010000001100001011111000100000111110110111011010010100 
1110111110110101100011001001100110000100110011011101011100001010 
0001110110101001000001000101110000111101000100110011101000000110 
1000010000100011110101101110001110000011000000111101100100000001 
1011101010011101101000110100011101100110100001000111100101101100 
0101110011010101100101110010110111000000111111110011010101000000 
1100001101000001001010010100001011010110010000000110000100000001 
1110111101101111110001101101111010010001000101001010001010110100 
1111001001001000110001101000100111000110000000001011101101000000 
1010100010110101011010110000010000011111110101011101111001101110 
0000110111010000110001100110110101001000001100011111111001111111 
1111111101010111010101111110010001110001000010011000000011001101 
1011110101011100001001101000010010000101110110100101111010010001 
1011001111100010111100100000010110110111001001110010010110111001 
0111000111010110000010100001111110001000100011110000100010100000 
1010011011100001000000001100110011101101110000101100111001011011 
1101100110001010111011100111000111100100001011100010011010001101 
0011011110100110000001110010111100100010000000100011010001100001 
0011111111111100001000100100010100110100001110011110101010010111 
1010100110011001101101101100100111100011110011100111000111111001 
0100110101100000100100101010110011100001001000001010101110001110 
0101010100001110000011010101010100010001011010001000011000110001 
0111011110001100111101100000001101010000110100000010111111101000 
0101111100101001111011001000101111100101110001110010101110000000 
0111101011110101011101110001101110000010010110110011000010100000 
1110011110000011011101101010100100011100000010001100011010100111 
1111000011111000111100110010001110110011011000101000000111010010 
0010010101101000100111000000101101011010100000100000010001111101 
1011100110001001111101100011101010001010011001001110100001010001 
1001101111000000110100001100000111100010001000101000000001001000 
0100110110010100111101001111100110111011001111010100101100110001 
1101010010001001110101110101001000110001101101011100011000110011 
1100010010000000110010010110101111100101010010011011111101011101 
1001011001100111100010110100110100101100010011011101101010000110 
0111101111011000111001001000000000101001111111101010100011001000 
0001011100110101011001111100001010111010001111010011110011101001 
1101111111100000101111010001101101001101110101110111000100010111 
1000000001010111101101101001010110110111111010101111000110110000 
0101110000100010110010001101010111111110111010111101000001110111 
1111111011001001011011011011100011110111011110001111110000011100 
0010101110111011110011100001101101001001111010111111010110101111 
0100010001100000100010000010100101011000101011011101000000011100 
1010011111110001101101101011110000001011011111101100000110111100 
0110111000001010011011101101101111000110011111111000010110110010 
0111010011100000100001100001101100111010000100110111010101110001 
1011000101100101010010011000011100111101001000010001110001101010 
1010111001101001110110000000000111100101011110010100010001011011 
1100011000001010001111100000101001001111110110001001011010001110 
1011011110010100101111011100011100000010110101101001010001011101 
1010100101001011000001001010010001000000110010101011110010010100 
0011100001111100001111010010011011111101000011110011101111101000 
1010111101100011000001011010010100111010000101110111001010001000 
1010110010100001001111111011010000000110110010011000001010010001 
0101110110000011101110100000110100110101010110001101100000011101 
1101000100010101100111101001011001000011111010101010001001111110 
1011011101110101011110100010000001010010100101110101101101101111 
0100101010001000100111100011110100001001001010111011000111000110 
1000010101001000000011011100001011101001100110010100011110110011 
0111001011011110110110100000010111100010000110010010111110010101 
1011000110111001001001100101000100101011010000000100110000110011
0001100000011101011...

The distribution of 1’s and 0’s seems effectively random, as though the God of Mathematics were endlessly tossing a coin, putting 1 for heads, 0 for tails. Yet √2 is the opposite of a random number. Change a single digit anywhere and it ceases to be √2. Every 1 and every 0 is rigidly determined by “unalterable law”. So are the position and magnitude of the digits of √2 in every other base. Here, for example, is √2 in base 4:

1·
112220021321212133303233030210020230233230103121232222111133
103320322313230011311010213131100212131220233112100230012121
303020222211133210012002013111...

Another word for base-4 is DNA: genes are in fact written in a base-4 code based on the chemicals guanine, adenine, thymine and cytosine, or G, A, T, C for short. If the digits of √2 are truly random, in the statistical sense, then all genomes, actual and potential, occur somewhere along its length: yours, mine, the Emperor Heliogabalus’s, Bilbo Baggins’, the sabre-toothed tiger’s, the dodo’s, and so on. But almost all the “DNA” of √2 in base-4 will be meaningless: although √2 is the opposite of random, it is effectively a typing chimpanzee. Or a typing worm – a type-worm. √2 is like an endless worm that types out its own segments on a typewriter with two keys (for binary numbers) or four keys (for quaternary numbers) or ten keys (for decimal numbers) and so on.

But √2 doesn’t just encode the genomes of individual people, animals and plants: it encodes everything they do throughout their lives. In fact, it encodes the entire universe. And perhaps the universe is √2 or some number like it. Perhaps, in some sense, everything exists within the digits of an irrational number, or a sufficiently large rational number. If so, then √2 has become aware of itself through human beings: the World as Worm has bitten its own tail.

Appendix: Proof of the irrationality of √2

1. Suppose that there is some ratio, a/b, such that

2. a and b have no factors in common and

3. a^2/b^2 = 2.

4. It follows that a^2 = 2b^2.

5. Therefore a is even and there is some number, c, such that 2c = a.

6. Substituting c in #4, we derive (2c)^2 = 4c^2 = 2b^2.

7. Therefore 2c^2 = b^2 and b is also even.

8. But #7 contradicts #2 and the supposition that a and b have no factors in common.

9. Therefore, by reductio ad absurdum, there is no ratio, a/b, such that a^2/b^2 = 2. Q.E.D.