Message from Mater

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:

5/3 = 1 + 1/(1 + ½) = 1 + ⅔
5/3 = [1; 1, 2]

19/7 = 2 + 1/(1 + 1/(2 + ½)) = 2 + 4/7
19/7 = [2; 1, 2, 2]

2/3 = 0 + 1/(1 + 1/2)
2/3 = [0; 1, 2] (compare 5/3 above)

3/5 = 0 + 1/(1 + 1/(1 + 1/2))
3/5 = [0; 1, 1, 2]

5/7 = 0 + 1/(1 + 1/(2 + 1/2))
5/7 = [0; 1, 2, 2] (compare 19/7 above)

13/17 = 0 + 1/(1 + 1/(3 + 1/4))
13/17 = [0; 1, 3, 4]

30/67 = 0 + 1/(2 + 1/(4 + 1/(3 + ½)))
30/67 = [0; 2, 4, 3, 2]

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:

φ = 1 + (1/(1 + 1/(1 + 1/(1 + …)))φ = [1; 1]

√2 = 1 + (1/(2 + 1/(2 + 1/(2 + …)))
√2 = [1; 2]

π = 3 + 1/(7 + 1/(15 + 1/(1 + 1/(292 + 1/(1 + 1/(1 + 1/(1 + 1/(2 + 1/(1 + 1/(3 +…))))))))))
π = [3; 7, 15, 1, 292, 1, 1, 1, 2, 1, 3…]

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:

Spiral for contfrac > 10


Spiral for contfrac > 15


Spiral for contfrac > 20


Spiral for contfrac > 25


Spiral for contfrac > 30


Spiral for contfrac > 35


Spiral for contfrac > 40


Spirals for contfrac > 5..40 (animated at EZgif)


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.

In 10 Words: Im-Precise

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!”

Harcissism (Caveat Lector!)

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:


15 = sum(1..5)
27 = sum(2..7)
429 = sum(4..29)
1353 = sum(13..53)
1863 = sum(18..63)


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:


0.45 = sum(1/4..1/5)
1.683... = sum(1/16..1/83)
0.361517... = sum(1/361..1/517)
3.61316... = sum(1/36..1/1316)
4.22847... = sum(1/42..1/2847)
3.177592... = sum(1/317..1/7592)
8.30288... = sum(1/8..1/30288)


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)

A Pox on Poetry

From The Ultimate Christmas Cracker (2019), compiled by John Julius Norwich:

How beautiful, I have often thought, would be the names of many of our vilest diseases, were it not for their disagreeable associations. My old friend Jenny Fraser sent me this admirable illustration of the fact by J.C. Squire:

So forth then rode Sir Erysipelas
From good Lord Goitre’s castle, with the steed
Loose on the rein: and as he rode he mused
On Knights and Ladies dead: Sir Scrofula,
Sciatica, he of Glanders, and his friend,
Stout Sir Colitis out of Aquitaine,
And Impetigo, proudest of them all,
Who lived and died for blind Queen Cholera’s sake:
Anthrax, who dwelt in the enchanted wood
With those princesses three, tall, pale and dumb,
And beautiful, whose names were Music’s self,
Anaemia, Influenza, Eczema.
And then once more the incredible dream came back,
How long ago upon the fabulous Shores
Of far Lumbago, all of a summer’s Day,
He and the maid Neuralgia, they twain,
Lay in a flower-crowned mead, and garlands wove,
Of gout and yellow hydrocephaly,
Dim palsies, and pyrrhoea, and the sweet
Myopia, bluer than the summer Sky:
Agues, both white and red, pied common cold,
Cirrhosis and that wan, faint flower
The shep­herds call dyspepsia. — Gone, all gone:
There came a Knight: he cried ‘Neuralgia!’
And never a voice to answer. Only rang
O’er cliff and battlement and desolate mere
‘Neuralgia!’ in the echoes’ mockery.


Elsewhere Other-Accessible…

J.C. Squire at Wikipedia

Post-Performative Post-Scriptum

nosopoetic (obsolete rare) Producing or causing disease. ← noso- comb. form + ‑poetic comb. form, after Hellenistic Greek νοσοποιός causing illness; compare ancient Greek νοσοποιεῖν to cause illness. — Oxford English Dictionary

Fract-L Geometry

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)…


Here are frac-Ls for tetrahedral and square-pyramidal numbers:

Frac-L for tetrahedral fractions


Frac-L for square pyramidal fractions


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)