Fibonacci's Infinite Sequence
In software, it's fairly common to see recursive acronyms. That is, an acronym that uses its own name in its definition. The classic example is GNU, which stands for "GNU's Not Unix"... which stands for "GNU's Not Unix's Not Unix". In theory, you could keep expanding it forever, like so:
An even earlier example were the pair of editors called EINE and ZWEI. EINE was based on the Emacs editor, and so obviously stood for "EINE Is Not Emacs". ZWEI was the successor to EINE, and so received the name "ZWEI Was EINE Initially". This is a more complex recursive acronym, which you can explore below:
This recursive acryonm has a pleasingly regular pattern. The number of ZWEIs stays the same. The number of EINEs increases by 1 each time. But what about the number of Emacses? That seems to grow even faster. Let's add a counter (and an auto-expander to spare our poor wrists):
1, 3, 6, 10, 15? Those are the triangular numbers! To my knowledge, nobody else has noticed that you can generate the triangular numbers by counting the number of times ZWEI's acronym mentions Emacs before. I admit the practical applications of this may be somewhat limited, but what an interesting find! Here's a more compact version:
Can we do anything else fun with recursive acronyms? It sure seems that way. I spent some time shuffling characters around and figured out an acronym (kinda) called Fibonacci's I S. "I" stands for "Infinite S", and "S" stands for "Sequence of I S". It looks like this:
And a more compact version. That S/I number looks awfully familiar:
After messing around with these for a little while I discovered they are called L-systems, and they can be used to make all sorts of interesting fractals and things. They were invented to model the growth of algae and other simple organisms, and not to calculate number sequences from the recursive acronyms of software programs.
Just goes to show you that there can be a surprising amount of depth in silly things if you chase them down far enough. You can find the code I used for the above demonstrations on GitHub, and a standalone demo on my demoserver.