Think Frink

Inky Bloaters (1987) is the name of an album by psycho-songstress Danielle Dax. Frinky growthers are those who are interested in frincremental growth. That’s growth by fractions, as in the equation x = x + 1/x. If the initial x = 1, its frincremental growth looks like this:

1
1 + 1/1 = 1 + 1 = 2
2 + 1/2 = 2_1/2
2_1/2 + 1/2_1/2 = 2_9/10
2_9/10 + 1/2_9/10 = 3_71/290
3_71/290 + 1/3_71/290 = 3_150911/272890
3_150911/272890 → 3_220789390391/264588959090 → 4_25570190327910692085061/268440386798659418988490 → 4_100170363026578204006507990129853967021051645381/295105036840595214385430531020664149472669868290

As you can see, the numerators and denominators of the fractional part of x get very large very quickly. So you can’t track the frincremental growth of x with perfect accuracy. Even the most compendious computer will run out of space. But representing x as a decimal is usually enough for us frinky growthers:

1 + 1 = 2
2 + 1/2 = 2 + 0.5 = 2.5
2.5 + 1/2.5 = 2.9
3.244827586206896551724137931…
3.553010370478947561288431236…
3.834461842815967366750790750…
4.095254632258778985771918456…
4.339439692724345181049239663…
4.569884190357676650018985962…
4.788708116379690742064597208…
4.997532704493448986664559639…
5.197631445038131469095668466…
5.390026771750770995914851381…
5.575554607204394029915651664…
5.754908962142979073283550015…
5.928673657045750549124213874…
6.097345447373015508408978797…
6.261351244425377152997703626…
6.421061179383957004641284553…
6.576798676981813718180627345…

The larger x gets, the slower it grows. But it never stops growing and will pass any finite integer in finite time. I was interested in the fractional part of x += 1/x (a shorthand for x = x + 1/x). Plainly, it’s almost unique for every integer seed (the fractional part is identical, just displaced by one step, for initial x = 1 = 2). I graphed the fractional part of x += 1/x for 1, 2, 3, 4, 5… and discovered some interesting patterns:

frac(x) of x += 1/x for x = 1, 2, 3, 4, 5…


Later frac(x) of x += 1/x





In time, the rounded patterns disappear for lower initial x. But you also get symmetrical patterns for x += sqrt(x), that is, x = x + square_root(x). And they last longer:

frac(x) of x += sqrt(x) for 1, 2, 3, 4, 5… #1


frac(x) of x += sqrt(x) for 1, 2, 3, 4, 5… #2


frac(x) of x += sqrt(x) for 1, 2, 3, 4, 5… #3


frac(x) of x += sqrt(x) for 1, 2, 3, 4, 5… #4


frac(x) of x += sqrt(x) for 1, 2, 3, 4, 5… #5


Here’s an animation of the first fifty steps of x += sqrt(x):

animated frac(x) of x += sqrt(x) for 1, 2, 3, 4, 5… (animated at EZgif) (click for larger image)


And what about x += ln(x), or x = x + natural_logarithm(x)? The patterns are both more dynamic and longer-lasting for lower initial x:

frac(x) of x += ln(x) for 1, 2, 3, 4, 5… #1


frac(x) of x += ln(x) for 1, 2, 3, 4, 5… #2


frac(x) of x += ln(x) for 1, 2, 3, 4, 5… #3


frac(x) of x += ln(x) for 1, 2, 3, 4, 5… #4


And two animations of x += ln(x), one slower, one faster:

animated frac(x) of x += sqrt(x) for 1, 2, 3, 4, 5… (EZgif) (click for larger)


faster animated frac(x) of x += sqrt(x) for 1, 2, 3, 4, 5… (click for larger)


Pi in the Bi

Binary is beautiful — both simple and subtle. What could be simpler than using only two digits to count with?


0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111, 10000, 10001, 10010, 10011, 10100, 10101, 10110, 10111, 11000, 11001, 11010, 11011, 11100, 11101, 11110, 11111, 100000, 100001, 100010, 100011, 100100, 100101, 100110, 100111, 101000, 101001, 101010, 101011, 101100, 101101, 101110, 101111, 110000, 110001, 110010, 110011, 110100, 110101, 110110, 110111, 111000, 111001, 111010, 111011, 111100, 111101, 111110, 111111, 1000000...

But the simple patterns in the two digits of binary involve two of the most important numbers in mathematics: π and e (aka Euler’s number):


π = 3.141592653589793238462643383...
e = 2.718281828459045235360287471...

It’s easy to write π and e in binary:


π = 11.00100 10000 11111 10110 10101 00010...
e = 10.10110 11111 10000 10101 00010 11000...

But how do π and e appear in the patterns of binary 1 and 0? Well, suppose you use the digits of binary to generate the sums of distinct integers. For example, here are the sums of distinct integers you can generate with four digits of binary, if you count the digits from right to left (so the rightmost digit is 1, the the next-to-rightmost digit is 2, the next-to-leftmost digit is 3, and the leftmost digit is 4):


0000 → 0*4 + 0*3 + 0*2 + 0*1 = 0
0001 → 0*4 + 0*3 + 0*2 + 1*1 = 1*1 = 1
0010 → 0*4 + 0*3 + 1*2 + 0*1 = 1*2 = 2
0011 → 0*4 + 0*3 + 1*2 + 1*1 = 1*2 + 1*1 = 3
0100 → 1*3 = 3
0101 → 1*3 + 1*1 = 4
0110 → 3 + 2 = 5
0111 → 3 + 2 + 1 = 6
1000 → 4
1001 → 4 + 1 = 5
1010 → 4 + 2 = 6
1011 → 4 + 2 + 1 = 7
1100 → 4 + 3 = 7
1101 → 4 + 3 + 1 = 8
1110 → 4 + 3 + 2 = 9
1111 → 4 + 3 + 2 + 1 = 10

There are 16 sums (16 = 2^4) generating 11 integers, 0 to 10. But some integers involve more than one sum:


3 = 2 + 1 ← 0011
3 = 3 ← 0100

4 = 3 + 1 ← 0101
4 = 4 ← 1000

5 = 3 + 2 ← 0110
5 = 4 + 1 ← 1001

6 = 3 + 2 + 1 ← 0111
6 = 4 + 2 ← 1010

7 = 4 + 2 + 1 ← 1011
7 = 4 + 3 ← 1100

Note the symmetry of the sums: the binary number 0011, yielding 3, is the mirror of 1100, yielding 7; the binary number 0100, yielding 3 again, is the mirror of 1011, yielding 7 again. In each pair of mirror-sums, the two numbers, 3 and 7, are related by the formula 10-3 = 7 and 10-7 = 3. This also applies to 4 and 6, where 10-4 = 6 and 10-6 = 4, and to 5, which is its own mirror (because 10-5 = 5). Now, try mapping the number of distinct sums for 0 to 10 as a graph:

Graph for distinct sums of the integers 0 to 4


The graph show how 0, 1 and 2 have one sum each, 3, 4, 5, 6 and 7 have two sums each, and 8, 9 and 10 have one sum each. Now look at the graph for sums derived from three digits of binary:

Graph for distinct sums of the integers 0 to 3


The single taller line of the seven lines represents the two sums of 3, because three digits of binary yield only one sum for 0, 1, 2, 4, 5 and 6:


000 → 0
001 → 1
010 → 2
011 → 2 + 1 = 3
100 → 3
101 → 3 + 1 = 4
110 → 3 + 2 = 5
111 → 3 + 2 + 1 = 6

Next, look at graphs for sums derived from one to sixteen binary digits and note how the symmetry of the lines begins to create a beautiful curve (the y axis is normalized, so that the highest number of sums reaches the same height in each graph):

Graph for sums from 1 binary digit


Graph for sums from 2 binary digits


Graph for sums from 3 binary digits


Graph for sums from 4 binary digits


Graph for sums from 5 binary digits


Graph for sums from 6 binary digits


Graph for sums from 7 binary digits


Graph for sums from 8 binary digits


Graph for sums from 9 binary digits


Graph for sums from 10 binary digits


Graph for sums from 11 binary digits


Graph for sums from 12 binary digits


Graph for sums from 13 binary digits


Graph for sums from 14 binary digits


Graph for sums from 15 binary digits


Graph for sums from 16 binary digits


Graphs for 1 to 16 binary digits (animated)


You may recognize the shape emerging above as the bell curve, whose formula is this:

Formula for the normal distribution or bell curve (image from ThoughtCo)


And that’s how you can find pi in the bi, or π in the binary digits of 0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, 1100, 1101…

(And how you find e too, as promised above.)


Post-Performative Post-Scriptum

I asked this question above: What could be simpler than using only two digits? Well, using only one digit is simpler still:


1, 11, 111, 1111, 11111, 111111, 1111111, 11111111, 111111111, 1111111111...

But I don’t see an easy way to find π and e in numbers like that.