If you go back far enough, we’re all worms. All us animals, that is. But in a subtler sense, all life is vermiform — animals, plants, fungi, bacteria. DNA is a kind of worm, a string of chemicals encoding the recipe for an animal, plant, fungus or bacterium. And the worms of DNA can be converted into numbers, just as some numbers can be turned into worms:
3/7 = 0·0.428571428571428571428571…
154/183 = 0.841530054644808743169398907…
√2 = 1.414213562373095048801688…
π = 3.1415926535897932384626433…
Those are decimals, but there’s another kind of worm for such numbers. It’s called a continued fraction:
contfrac(3/7) = [0,2,3]
contfrac(154/183) = [0,1,5,3,4,2]
contfrac(√2) = [1,2,2,2,2,2…]
contfrac(π) = [3, 7, 15, 1, 292, 1, 1, 1, 2, 1, 3, 1, 14, 2, 1, 1, 2, 2, 2, 2, 1, 84, 2, 1, 1, 15…]
Extracting and enacting continued fractions is very simple. Here’s the extracting:
3/7 → 1/(3/7) = 7/3 = 2+1/3 – 2 = 1/3 → 1(1/3) = 3, ∴ contfrac(3/7) = [0,2,3]
154/183 → 1/(154/183) = 183/154 = 1 + 29/154 – 1 = 29/154 → 1/(29/154) = 154/29 = 5 + 9/29 – 5 = 9/29 → 1/(9/29) = 29/9 = 3 + 2/9 – 3 = 2/9 → 1/(2/9) = 9/2 = 4 + 1/2 – 4 = 1/2 → 1/(1/2) = 2 – 2 = 0, ∴ contfrac(154/183) = [0,1,5,3,4,2]
And here’s the enacting:
[0,2,3] → 3 → 1/3 → 1/3 + 2 = 7/3 → 1/(7/3) = 3/7
[0,1,5,3,4,2] → 2 → 1/2 → 1/2 + 4 = 9/2 → 2/9 + 3 = 29/9 → 9/29 + 5 = 154/29 → 29/154 + 1 = 183/154 → 1/(183/154) = 154/183
Once you’ve got the worm of a continued fraction, you can perm the worm, as it were, generating different fractions like this (I’m dropping the initial [0,…] of the contfracs):
[2,3,4] = contfrac(13/30)
[2,4,3] → 13/29
[3,2,4] → 09/31
[3,4,2] → 09/29
[4,2,3] → 07/31
[4,3,2] → 07/30
Reversing a continued fraction is a kind of permutation, so the fractal below represents one kind of worms in terms of perms:

Variant of a limestone fractal or gryke fractal
I call that graph a fract-L, because it’s shaped like an L and the x axis represents the simplified fractions 1/2, 1/3, 2/3, 1/4, 3/4, 1/5, 2/5, 3/5…, while the y axis represents the fractions you get by reversing the continued fractions of 1/2, 1/3, 2/3…:
contfrac(1/2) = [2] → 1/2
contfrac(1/3) = [3] → 1/3
contfrac(2/3) = [1,2] → 1/3
contfrac(1/4) = [4] → 1/4
contfrac(3/4) = [1,3] → 1/4
contfrac(1/5) = [5] → 1/5
contfrac(2/5) = [2,2] → 2/5
contfrac(3/5) = [1,1,2] → 2/5
contfrac(4/5) = [1,4] → 1/5
contfrac(1/6) = [6] → 1/6
contfrac(5/6) = [1,5] → 1/6
contfrac(1/7) = [7] → 1/7
contfrac(2/7) = [3,2] → 3/7
contfrac(3/7) = [2,3] → 2/7
contfrac(4/7) = [1,1,3] → 2/7
contfrac(5/7) = [1,2,2] → 3/7
contfrac(6/7) = [1,6] → 1/7
contfrac(1/8) = [8] → 1/8
contfrac(3/8) = [2,1,2] → 3/8
contfrac(5/8) = [1,1,1,2] → 3/8
contfrac(7/8) = [1,7] → 1/8
contfrac(1/9) = [9] → 1/9
contfrac(2/9) = [4,2] → 4/9
contfrac(4/9) = [2,4] → 2/9
contfrac(5/9) = [1,1,4] → 2/9
contfrac(7/9) = [1,3,2] → 4/9
contfrac(8/9) = [1,8] → 1/9
[…]
If you perm the worm in other ways, you get other shapes on the fract-L. I looked at continued fractions of fixed length, 4, 5 and 6, and permed them using one of the permutations of [1,2,3,4], [1,2,3,4,5] and [1,2,3,4,5,6]. Here’s a graph for fractions, a/b, and permed fractions, perm(a/b), where length(contfrac(a/b)) = 4:
x = a/b when length(contfrac(a/b)) = 4, y = fraction from contfrac(a/b) permed with [1,3,2,4]
The x axis represents simplified fractions, a/b, when len(cf(a/b)) = 4. The y axis represents the fractions found by applying the perm [1,3,2,4] to contfrac(a/b). That is, the first number of the contfrac stays where it is, the third number moves to position 2, the second number moves to position 3 and the fourth number stays where it is. In short, you simply swap the middle two numbers of contfrac(a/b). Here’s an example:
contfrac(9/43) = [4,1,3,2] → [4,3,1,2] → 11/47, because contfrac(11/47) = [4,3,1,2]
Here are more fract-Ls representing worms in terms of perms:
fract-L for contfrac(a/b) permed by [2,1,3,4]
fract-L for contfrac(a/b) permed by [3,2,1,4]
fract-L for contfrac(a/b) permed by [1,4,2,3,5] (i.e. a/b where len(contfrac(a/b)) = 5)
fract-L for contfrac(a/b) permed by [1,5,3,4,2]
fract-L for contfrac(a/b) permed by [2,1,4,3,5]
fract-L for contfrac(a/b) permed by [3,4,1,2,5]
fract-L for contfrac(a/b) permed by [4,2,3,1,5]
fract-L for contfrac(a/b) permed by [4,2,5,3,1]
fract-L for contfrac(a/b) permed by [4,3,2,1,5]
fract-L for contfrac(a/b) permed by [5,3,4,2,1]
fract-L for contfrac(a/b) permed by [2,1,4,3,5,6] (i.e. a/b where len(contfrac(a/b)) = 6)
fract-L for contfrac(a/b) permed by [2,1,5,4,3,6]
fract-L for contfrac(a/b) permed by [3,2,1,4,5,6]
fract-L for contfrac(a/b) permed by [3,2,1,5,4,6]
fract-L for contfrac(a/b) permed by [3,5,1,4,2,6]
fract-L for contfrac(a/b) permed by [4,2,5,1,3,6]
fract-L for contfrac(a/b) permed by [4,3,2,1,5,6]
fract-L for contfrac(a/b) permed by [4,5,2,3,1,6]
fract-L for contfrac(a/b) permed by [1,3,2,6,5,4,7] (i.e. a/b where len(contfrac(a/b)) = 7)
fract-L for contfrac(a/b) permed by [1,5,2,6,3,4,7]
fract-L for contfrac(a/b) permed by [5,6,3,7,4,1,2]
fract-L for contfrac(a/b) permed by [6,2,3,5,4,1,7]
fract-L for contfrac(a/b) permed by [6,2,5,4,7,3,1]
Post-Performative Post-Scriptum
Much as I hate the phrase “in terms of”, I was happy to use it in the title of this post. After all, it isn’t ugly but assonant there. And it began life in mathematics, where it still has its proper meaning rather than being pretentious and prolix:
How did this complex preposition come into being? The OED [Oxford English Dictionary] reveals that it has been in use since the mid-18c. as a mathematical expression “said of a series…stated in terms involving some particular (my emphasis) quantity”, and illustrates this technical usage by citing examples from the work of Herbert Spencer (1862), J. F. W. Herschel (1866), and other writers. From this technical use came at first a trickle and, after the 1940s, a flood of imitative uses by non-mathematicians. — “Terminal Trinity”
Elsewhere Other-Engageable
• A Fracteasel on a Fract-L — an earlier look at continued fractions and fractal fract-Ls































































































