There are an infinite number of points in the plane. And in part of the plane. So you have to pare points to create interesting shapes. And one way of paring them is by comparing them. The six red dots in the image below mark the three vertices of an equilateral triangle and the three mid-points of the sides. Now, test the other points in the surrounding plane and mark them in white if the average distance to (the centers of) any two of the red dots is equal to the average distance to (the centers of) the four other red dots:
“The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents.” So said HPL in “The Call of Cthulhu” (1926). But I’d still like to correlate the contents of mine a bit better. For example, I knew that φ, the golden ratio, is the most irrational of all numbers, in that it is the slowest to be approximated with rational fractions. And I also knew that continued fractions, or CFs, were a way of representing both rationals and irrationals as a string of numbers, like this:
But I didn’t correlate those two contents of my mind: the maximal irrationality of φ and the way continued fractions work.
That’s why I was surprised when I was looking at the continued fractions of 2..(n-1) / n for 3,4,5,6,7… That is, I was looking at the continued fractions of 2/3, 3/4, 2/5, 3/5, 4/5, 5/6, 2/7, 3/7… (skipping fractions like 2/4, 2/6, 3/6 etc, because they’re reducible: 2/4 = ½, 2/6 = 1/3, 3/6 = ½ etc). I wondered which fractions set successive records for the length of their continued fractions as one worked through ½, 2/3, 3/4, 2/5, 3/5, 4/5, 5/6, 2/7, 3/7… And because I hadn’t correlated the contents of my mind, I was surprised at the result. I shouldn’t have been, of course:
Which n1/n2 set records for the length of their continued fractions (with n2 > n1)? It’s the successive Fibonacci fractions, fib(i)/fib(i+1), of course. I didn’t anticipate that answer because I didn’t understand φ and continued fractions properly. And I still don’t, because I’ve been surprised again today looking at palindromic CFs like these:
Now it’s the successive Fibonacci skip-one fractions, fib(i)/fib(i+2), that set records for the length of their palindromic continued fractions. But I think you’d have to be very good at maths not to be surprised by that result.
After that, I continued to be compelled by the Call of CFulhu and started to look at the CFs of Fibonacci skip-n fractions in general. That’s contfrac(fib(i)/fib(i+n)) for n = 1,2,3,… And I’ve found more interesting patterns, as I’ll describe in a follow-up post.
As any recreational mathematician kno, the Ulam spiral shows the prime numbers on a spiral grid of integers. Here’s a Ulam spiral with 1 represented in blue and 2, 3, 5, 7… as white blocks spiralling anti-clockwise from the right of 1:
The Ulam spiral of prime numbers
Ulam spiral at higher resolution
I like the Ulam spiral and whenever I’m looking at new number sequences I like to Ulamize it, that is, display it on a spiral grid of integers. Sometimes the result looks good, sometimes it doesn’t. But I’ve always wondered something beforehand: will this be the spiral where I see a message appear? That is, will I see a message from Mater Mathematica, Mother Maths, the omniregnant goddess of mathematics? Is there an image or text embedded in some obscure number sequence, revealed when the sequence is Ulamized and proving that there’s divine intelligence and design behind the universe? Maybe the image of a pantocratic cat will appear. Or a text in Latin or Sanskrit or some other suitably century-sanctified language.
That’s what I wonder. I don’t wonder it seriously, of course, but I do wonder it. But until 22nd March 2025 I’d never seen any Ulam-ish spiral that looked remotely like a message. But 22nd May is the day I Ulamed some continued fractions. And I saw something that did look a little like a message. Like text, that is. But I might need to explain continued fractions first. What are they? They’re a fascinating and beautiful way of representing both rational and irrational numbers. The continued fractions for rational numbers look like this in expanded and compact format:
The continued fractions of irrational numbers are different. Most importantly, they never end. For example, here are the infinite continued fractions for φ, √2 and π in expanded and compact format:
As you can see, the continued fraction of π doesn’t fall into a predictable pattern like those for φ and √2. But I’ve already gone into continued fractions further than I need for this post, so let’s return to the continued fractions of rationals. I set up an Ulam spiral to show patterns based on the continued fractions for 1/1, ½, ⅓, ⅔, 1/4, 2/4, 3/4, 1/5, 2/5, 3/5, 4/5, 1/6, 2/6, 3/6… (where the fractions are assigned to 1,2,3… and 2/4 = ½, 2/6 = ⅓ etc). For example, if the continued fraction contains a number higher than 5, you get this spiral:
Spiral for continued fractions containing at least number > 5
With tests for higher and higher numbers in the continued fractions, the spirals start to thin and apparent symbols start to appear in the arms of the spirals:
Here are some more of these spirals at increasing magnification:
Spiral for contfrac > 23 (#1)
Spiral for contfrac > 23 (#2)
Spiral for contfrac > 23 (#3)
Spiral for contfrac > 13
Spiral for contfrac > 15 (off-center)
Spiral for contfrac > 23 (off-center)
And here are some of the symbols picked out in blue:
Spiral for contfrac > 15 (blue symbols)
Spiral for contfrac > 23 (blue symbols)
But they’re not really symbols, of course. They’re quasi-symbols, artefacts of the Ulamization of a simple test on continued fractions. Still, they’re the closest I’ve got so far to a message from Mater Mathematica.
I was looking at the best rational approximations for π when I was puzzled for a moment or two by the way the precision of digits didn’t always improve: 22/7 →
3.1428571... = 22/7 (precision = 3 digits)
3.1415926... = π 333/106 →
3.141509433... = 333/106 (pr=5)
3.141592653... = π 355/113 →
3.14159292035... = 355/113 (pr=7)
3.14159265358... = π 103993/33102 →
3.14159265301190... (pr=10)
3.14159265358979... = π 104348/33215 →
3.14159265392142... (pr=10)
3.14159265358979... = π 208341/66317 →
3.14159265346743... (pr=10)
3.14159265358979... = π 312689/99532 →
3.14159265361893... (pr=10)
3.14159265358979... = π 833719/265381 →
3.1415926535810777... (pr=12)
3.1415926535897932... = π 1146408/364913 →
3.141592653591403... (pr=11)
3.141592653589793... = π 4272943/1360120 →
3.14159265358938917... (pr=13)
3.14159265358979323... = π 5419351/1725033 →
3.14159265358981538... (pr=13)
3.14159265358979323... = π 80143857/25510582 →
3.1415926535897926593... (pr=15)
3.1415926535897932384... = π 165707065/52746197 →
3.14159265358979340254... (pr=16)
3.14159265358979323846... = π 245850922/78256779 →
3.14159265358979316028... (pr=16)
3.14159265358979323846... = π 411557987/131002976 →
3.141592653589793257826... (pr=17)
3.141592653589793238462... = π 1068966896/340262731 →
3.1415926535897932353925... (pr=18)
3.1415926535897932384626... = π 2549491779/811528438 →
3.1415926535897932390140... (pr=18)
3.1415926535897932384626... = π 6167950454/1963319607 →
3.14159265358979323838637... (pr=19)
3.14159265358979323846264... = π 14885392687/4738167652 →
3.141592653589793238493875... (pr=20)
3.141592653589793238462643... = π
But it was my precision that was wrong, of course. I wasn’t thinking about digits precisely enough. One approximation can be closer to π with fewer precise digits than another (e.g. 3.14201… is closer to π than 3.14101…). The same applies in binary, but there the precision tends to increase much more obviously: 22/7 →
3.1428571... = 22/7 in base 10 (pr=3)
3.1415926... = π in base 10
11.0010010010010... = 22/7 in base 2 (pr=9)
11.0010010000111... = π in base 2 333/106 →
3.141509433... = 333/106 in b10 (pr=5)
3.141592653... = π in b10
11.001001000011100111... = 333/106 in b2 (pr=14)
11.001001000011111101... = π in b2 355/113 →
3.14159292035... (pr=7)
3.14159265358... = π
11.00100100001111110110111100... = 355/113 in b2 (pr=22)
11.00100100001111110110101010... = π in b2 103993/33102 →
3.14159265301190... (pr=10)
3.14159265358979... = π
11.001001000011111101101010100001100... (pr=29)
11.001001000011111101101010100010001... = π 104348/33215 →
3.14159265392142... (pr=10)
3.14159265358979... = π
11.001001000011111101101010100010011111... (pr=32)
11.001001000011111101101010100010001000... = π 208341/66317 →
3.14159265346743... (pr=10)
3.14159265358979... = π
11.001001000011111101101010100001111... (pr=29)
11.001001000011111101101010100010001... = π 312689/99532 →
3.14159265361893... (pr=10)
3.14159265358979... = π
11.001001000011111101101010100010001010010... (pr=35)
11.001001000011111101101010100010001000010... = π 833719/265381 →
3.1415926535810777... (pr=12)
3.1415926535897932... = π
11.0010010000111111011010101000100001111... (pr=33)
11.0010010000111111011010101000100010000... = π 1146408/364913 →
3.141592653591403... (pr=11)
3.141592653589793... = π
11.0010010000111111011010101000100010000111011... (pr=39)
11.0010010000111111011010101000100010000101101... = π 4272943/1360120 →
3.14159265358938917... (pr=13)
3.14159265358979323... = π
11.001001000011111101101010100010001000010100110... (pr=41)
11.001001000011111101101010100010001000010110100... = π 5419351/1725033 →
3.14159265358981538... (pr=13)
3.14159265358979323... = π
11.0010010000111111011010101000100010000101101010010... (pr=45)
11.0010010000111111011010101000100010000101101000110... = π 80143857/25510582 →
3.1415926535897926593... (pr=15)
3.1415926535897932384... = π
11.0010010000111111011010101000100010000101101000101101... (pr=48)
11.0010010000111111011010101000100010000101101000110000... = π 165707065/52746197 →
3.14159265358979340254... (pr=16)
3.14159265358979323846... = π
11.00100100001111110110101010001000100001011010001100010100... (pr=52)
11.00100100001111110110101010001000100001011010001100001000... = π 245850922/78256779 →
3.14159265358979316028... (pr=16)
3.14159265358979323846... = π
11.001001000011111101101010100010001000010110100011000000110... (pr=53)
11.001001000011111101101010100010001000010110100011000010001... = π 411557987/131002976 →
3.141592653589793257826... (pr=17)
3.141592653589793238462... = π
11.00100100001111110110101010001000100001011010001100001010001... (pr=55)
11.00100100001111110110101010001000100001011010001100001000110... = π 1068966896/340262731 →
3.1415926535897932353925... (pr=18)
3.1415926535897932384626... = π
11.00100100001111110110101010001000100001011010001100001000100110... (pr=58)
11.00100100001111110110101010001000100001011010001100001000110100... = π 2549491779/811528438 →
3.1415926535897932390140... (pr=18)
3.1415926535897932384626... = π
11.00100100001111110110101010001000100001011010001100001000110111010... (pr=61)
11.00100100001111110110101010001000100001011010001100001000110100110... = π 6167950454/1963319607 →
3.14159265358979323838637... (pr=19)
3.14159265358979323846264... = π
11.0010010000111111011010101000100010000101101000110000100011010001101... (pr=63)
11.0010010000111111011010101000100010000101101000110000100011010011000... = π 14885392687/4738167652 →
3.141592653589793238493875... (pr=20)
3.141592653589793238462643... = π
11.001001000011111101101010100010001000010110100011000010001101001110100... (pr=65)
11.001001000011111101101010100010001000010110100011000010001101001100010... = π
Post-Performative Post-Scriptum…
The title of this terato-toxic post is a maximal mash-up (wow) of two well-known toxico-teratic tropes:
• “There are 10 kinds of people in the world. Those who understand binary and those who don’t.”
• Sam Goldwyn’s malapropism: “In two words: im-possible!”
Pre-previously on Overlord-of-the-Über-Feral, I looked at patterns like these, where sums of consecutive integers, sum(n1..n2), yield a number, n1n2, whose digits reproduce those of n1 and n2:
Numbers like those can be called narcissistic, because in a sense they gaze back at themselves. Now I’ve looked at sums of consecutive reciprocals and found comparable narcissistic patterns:
Because the sum of consecutive reciprocals, 1/1 + 1/2 + 1/3 + 1/4…, is called the harmonic series, I’ve decided to call these numbers harcissistic = harmonic + narcissistic.
Post-Performative Post-Scriptum
Why did I put “Caveat Lector” (meaning “let the reader beware”) in the title of this post? Because it’s likely that some (or even most) fluent readers of English will misread the preceding word, “Harcissism”, as “Narcissism”.
Previously Pre-Posted (Please Peruse)
• Fair Pairs — looking at patterns like 1353 = sum(13..53)
Suppose you set up an L, i.e. a vertical and horizontal line, representing the x,y coordinates between 0 and 1. Next, find the fractional pairs x = 1/2, 1/3, 2/3, 1/4, 2/4…, y = 1/2, 1/3, 2/3, 1/4, 2/4… and mark the point (x,y). That is, find the point, say, 1/5 of the way along the x-line, then the points 1/5, 2/5, 3/5 and 4/5 along the y-line, marking the points (1/5, 1/5), (1/5, 2/5), (1/5, 3/5), (1/5, 4/5). Then find (2/5, 1/5), (2/5, 2/5), (2/5, 3/5), (2/5, 4/5) and so on. Some interesting patterns appear in what I call a Frac-L (pronounced “frackle”) or Fract-L:
Frac-L for 1/2 to 21/22
Frac-L for 1/2 to 48/49
Frac-L for 1/2 to 75/76
Frac-L for 1/2 to 102/103
Frac-L for 1/2 to 102/103 (animated)
If the (x,y) point is first red, then becomes different colors as it is repeatedly found, you get these patterns:
Frac-L for 1/2 to 48/49 (color)
Frac-L for 1/2 to 75/79 (color)
Frac-L for 1/2 to 102/103 (color) (animated)
Now try polygonal numbers. The triangular numbers are 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78…, so you’re finding the fractional pairs, say, (1/21, 1/21), (1/21, 3/21, (1/21, 6/21), (1/21, 10/21), (1/21, 15/21), then (3/21, 1/21), (3/21, 3/21, (3/21, 6/21), (3/21, 10/21), (3/21, 15/21), and so on:
Frac-L for triangular fractions
The frac-L for square numbers (1, 4, 9, 16, 25, 36, 49, 64, 81, 100…) is almost identical:
Frac-L for square fractions, e.g. (1/16, 1/16), (1/16, 4/16), (1/16, 9/16)…
So is the frac-L for pentagonal numbers (1, 5, 12, 22, 35, 51, 70, 92, 117, 145, 176, 210, 247, 287, 330…):
Frac-L for pentagonal fractions, e.g. (1/35, 5/35), (1/35, 12/35), (1/35,22/35)…
But what about prime numbers (skipping 2)? Here the fractional pairs are, say, (1/17, 1/17), (1/17, 3/17), (1/17, 5/17), (1/17, 7/17), (1/17, 11/17), (1/17, 13/17), then (3/17, 1/17), (3/17, 3/17), (3/17, 5/17), (3/17, 7/17), (3/17, 11/17), (3/17, 13/17), and so on:
Frac-L for 1/3 to 73/79 (prime fractions)
Frac-L for 1/3 to 223/227
Frac-L for 1/3 to 307/331
Frac-L for 1/3 to 307/331 (animated)
Frac-L for 1/3 to 73/79 (color) (prime fractions)
Frac-L for 1/3 to 223/227 (color)
Frac-L for 1/3 to 307/331 (color)
Frac-L for 1/3 to 307/331 (color) (animated)
And finally (for now), a frac-L for Fibonnaci numbers, where the fractional pairs are, say, (1/13, /13), (1/13, 2/13), (1/13, 3/13), (1/13, 5/13), (1/13, 8/13), then (2/13, /13), (2/13, 2/13), (2/13, 3/13), (2/13, 5/13), (2/13, 8/13), and so on:
Frac-L for Fibonacci fractions to 14930352/2178309 = fibonacci(36)/fibonacci(37)
It’s a very simple function that raises a very difficult question. An unanswered question, in fact. Take any whole number. If it’s odd, multiply it by 3 and add 1. If it’s even, divide it by 2. Repeat until you reach 1. That’s the hailstone function, because the numbers rise and fall like hailstones being formed in a cloud. Here are some examples:
But is this function truly a hailstone function? That is, does every number fall finally to earth and reach 1? So far, for every number tested, the answer has been yes. But do all numbers reach 1? The Collatz conjecture says they do. But no-one can prove it. Or disprove it. All it would take is one number failing to fall to earth. Mathematicians don’t think there is one, but numbers can take a surprising length of time to get to the ground. Here’s 27:
27 takes 111 steps to reach 1. And the 111 made me think of another question. If the function hail(n) returns the number of steps required for n to reach 1, then hail(27) = 111. But what about hail(n) = 666? That is, what is the first number that requires 666 steps to reach 1? I say “first number”, because one very big number is guaranteed to take 666 steps:
Put another way, 666 = hail(2^666), because for any power of 2, hail(2^p) = p. But is there a smaller number, which I’ll call satan, for which hail(satan) = 666? Here’s a tantalizing taster of the task:
Here’s a question I haven’t answered: if satanic numbers are those n satisfying hail(n) = 666, how many satanic numbers are there? We’ve already seen two of them: 666 = hail(2^666) = hail(26597116). But how many more are there? Not infinitely many, because for n > 2^666, hail(n) > 666. In fact, after satan = 26597116, the next three satanic numbers arrive very quickly:
So there are four consecutive satanic numbers. But it isn’t unusual for a run of consecutive numbers to have the same hail(). Here’s a graph of the values of hail(n) for n = 1,2,3… (running left-to-right, down-up, with 1,2,3… in the lower lefthand corner). When n is divisible by 10, hail(n) is represented in red; when n is odd and divisible by 5, hail(n) is green. Note how many runs of identical hail(n) there are:
Graph for hail(n)
Here are successive records for runs of identical hail(n):
To understand clock-arithmetic, simply picture a clock-face with one hand and a big fat 0 in place of the 12. Now you can do some clock-arithmetic. For example, set the hour-hand to 5, then move on 4 hours. You’ve done this sum:
5 + 4 → 9
Now try 9 + 7. The hour-hand is already on 9, so move forward 7 hours:
9 + 7 → 4
Now try 3 + 8 + 1:
3 + 8 + 1 → 0
And 3 * 4:
4 * 3 = 4 + 4 + 4 → 0
That’s clock-arithmetic. But you’re not confined to 12-hour clocks. Here’s a 7-hour clock, where the 7 is replaced with a 0:
Another name for clock-arithmetic is modular arithmetic, because the clocks model the process of dividing a number by 12 or 7 and finding the remainder or residue — 12 or 7 is known as the modulus (and modulo is Latin for “by the modulus”).
5 + 4 = 9 → 9 / 12 = 0*12 + 9
(5 + 4) modulo 12 = 9
3 + 8 + 1 = 12 → 12 / 12 = 1*12 + 0
(3 + 8 + 1) modulo 12 = 0
19 / 12 = 1*12 + 7
19 mod 12 = 7
3 + 1 = 4 → 4 / 7 = 0*7 + 4
(3 + 1) mod 7 = 4
2 + 4 + 1 = 7 → 7 / 7 = 1*7 + 0
(2 + 4 + 1) mod 7 = 0
19 / 7 = 2*7 + 5
19 mod 7 = 5
Modular arithmetic can do wonderful things. One small but beautiful example is the way it can uncover hidden fractals in Pascal’s triangle:
But you don’t need to consider those ever-growing numbers in the triangle when you’re finding fractals with modular arithmetic. When the modulus is 2, you just work with 0 and 1, that is, you add the previous numbers in the triangle and find the sum modulo 2. When the modulus is 4, you just work with 0, 1, 2 and 3, adding the numbers and finding the sum modulo 4. When it’s 8, you just work with 0, 1, 2, 3, 4, 5, 6 and 7, finding the sum modulo 8. And so on.